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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issue with ExcelExportDataTableOptions.DetectColumnTypes

Thread ID:





116153 Apr 14,2014 11:18 PM UTC Apr 15,2014 07:29 AM UTC ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Xin Qian
Asked On April 14, 2014 11:18 PM UTC


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?

Prasanth M [Syncfusion]
Replied On 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.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon