You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
In excel worksheet column having text 10.10, but in Reogrid the column text displayed as 10.1 how to get the actual value as in Excel worksheet.
Offline
In some cases where ReoGrid cannot read correctly the Excel cell format, but data loaded properly. It's possible to change the display format by set the data format:
using unvell.ReoGrid;
using unvell.ReoGrid.DataFormat;
...
var sheet = grid.CurrentWorksheet;
sheet.SetRangeDataFormat("A1:D5", // target range or cell
CellDataFormatFlag.Number,
new NumberDataFormatter.NumberFormatArgs
{
DecimalPlaces = 2,
NegativeStyle = NumberDataFormatter.NumberNegativeStyle.Minus,
UseSeparator = true,
});
About cell format: http://reogrid.net/document/data-format/
Some similar problems have been resolved in current development version.
Offline
Excel Cell value is "1.1.1" but in Reogrid displayed as 1/1/2001. here Datatype of 1.1.1 is String. Please give your feed back.
We disabled autoformatcell grid.currentworksheet.setting(worksheetsettings.Edit_autoFormatCell, False).
Offline
Did you mean load from Excel? Currently when loading from Excel the Edit_AutoFormatCell does not work, it works only when cell editing. You could set the cell as text format after loading:
sheet.SetRangeDataFormat("A1:D5", CellDataFormatFlag.Text)
Offline
Thanks for your reply,
The Sample data as follows
a1 = 10.1
a2 = 1.1.1
a3 = 20.10
a4 = 10.10
after formating cell as text we got the result as
a1 = 10.1
a2 = 1.1.1
a3 = 20.1 (Here we need getcelltext = 20.10)
a4 = 10.1 (Here we need getcelltext = 10.10)
the entire column data type is string only.
Offline
You could set a1 and a2 as text format, a3 and a4 as number format.
Edit: I have tested this. ReoGrid ignores the Excel format settings (text format) so this is a bug, it will be fixed as soon as possible. Thanks for reporting.
Last edited by Jingwood (2015-02-26 09:02:55)
Offline
There is a preview release of 0.8.8.5. The problem above has been fixed in this version.
http://reogrid.net/preview-download/
Last edited by Jingwood (2015-03-24 15:05:04)
Offline
I think this problem has been fixed in 0.8.9.x versions.
Offline
Pages: 1
Topic closed