-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadFromDataTable Add data type detection For Excel Range #882
Comments
You can set number formats via attributes if desired...https://github.com/EPPlusSoftware/EPPlus/wiki/LoadFromCollection-using-Attributes. |
You're right, but if you still want to use LoadFromDataTable to do a lightweight export instead of defining a class that has specific definitions, one of the biggest problems with the DataTable right now is that it's a text type. If I just let Excel determine the data type, it's easy to lose precision with long integer numbers. I think I can rely on EPPLUS to convert the corresponding column to text type, Numberformat to @, when I finally write to Excel cells with a text type defined in the DataTable. |
Currently exporting Excel data, NumberFormat of Excel cell range is not set based on data type of DataTable
It is recommended to add the ability to specify Excel Range NumberFormat based on the DataTable data type, especially long integer fields. If String is specified in the DataTable and can be exported, NumberFormat is automatically set to "@" before exporting, so that the numbers can be displayed completely.
The text was updated successfully, but these errors were encountered: