-
Notifications
You must be signed in to change notification settings - Fork 273
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
ExcelTable's ToDataTable method failed to retain the error value string #1632
Comments
I use a loop to turn the error value into text, and then execute the following code to complete my expected effect, but the performance is poor, if you can judge once, it is best to set up in the column configuration. Error values are not very sensitive to Excel, and it is acceptable for some cells in a column or row of data to have error values, especially during formula operations. The direct conversion to empty, and the real cell empty both confuse, but cause ambiguity.
|
This is by design as the typical use-case for ToDataTable is to use it for database operations and typically the DatatableColumn has a specific datatype e.g. We've discussed it internally and will be adding the possibility to add your own mapping for this as a minor feature instead of adding it to the ExcelErrorParsingStrategy enum. Next version of Epplus you should be able to do something like:
This should also allow for mapping/transforming the error values to whatever column value might be appropriate. |
EPPlus usage
Commercial use (I have a commercial license)
Environment
Windows
Epplus version
7.4
Spreadsheet application
Excel
Description
I want to convert ExcelTable or Range to a memory DataTable with its original contents and error text as the error value, but that doesn't work now, the error value just becomes blank.
I tried to convert it to an error string manually in the column configuration, but it didn't work.
I think the priority and column configuration is more reasonable, so that the DataTable can get richer information, the current error value in addition to the error and ignore null, may lose some information with the real world use.
The text was updated successfully, but these errors were encountered: