After upgrading Syncfusion we have found an issue with one
function, IWorksheet.ExportDataTableExportDataTable(int firstRow, int
firstColumn, int maxRows, int maxColumns, ExcelExportDataTableOptions options)
The ExcelExportDataTableOptions used when the issue occurs
Some decimal values in the worksheet are being converted to
a date string ie 10.775 -> 01/10/0775 and 29.3 -> 29/03/2014.
A work-around is to use the
option ‘DetectColumnTypes’ as well (ExcelExportDataTableOptions is a flags enum
A consequence of using the
‘DetectColumnTypes’ non-blank, non-numeric values will be converted to NaN for
columns detected to be numeric.
The rules for detecting column
data types seem to be based on the value in the first row.
If the first value is an integer
the column data type will be double even if there are non-numeric values in
later rows. If the first value is a space then the column data type will be
string even if all other row values are integer.
For the above examples for
decimal values (10.775 and 29.3) the detected column data type is double.
Do you have an option that allows us to read the excel file "as is" into a data table, i.e. read everything as string and let us specify the data type for each column?
PMPrasanth M Syncfusion Team April 15, 2014 07:29 AM UTC
for using Syncfusion products.
The reported issue "Decimal values are
converted to date on ExportDataTable" has been fixed in our latest version
188.8.131.52 along with other major enhancements. So, we strongly recommend
you to upgrade to the latest version to get the issue resolved.