We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Issue with ExcelExportDataTableOptions.DetectColumnTypes


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 is ‘ComputedFormulaValues’.

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 type).

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?

1 Reply

PM Prasanth M Syncfusion Team April 15, 2014 07:29 AM UTC

Hi Xin,

Thank you for using Syncfusion products.

The reported issue "Decimal values are converted to date on ExportDataTable" has been fixed in our latest version along with other major enhancements. So, we strongly recommend you to upgrade to the latest version to get the issue resolved.

Release information : http://www.syncfusion.com/support/forums/announcements/116142
Whats New : http://www.syncfusion.com/products/whatsnew

Please let us know if you need any clarification.



Live Chat Icon For mobile
Up arrow icon