Expose cell format information
See original GitHub issueSome feature requests/issues have to do with more control over cell formatting: #15, #31, #39, #47, #53, #95, #178
Currently ExcelDataReader uses the cell format/style data to interpret values in number cells:
- if ConvertOaDate is true and cell has built-in date format: convert value to DateTime
- if ConvertOaDate is true and cell has custom date format: convert value to DateTime
- if cell has the ‘@’ custom format: convert value to string using default formatting rules
After this the cell format/style is discarded.
It would be more flexible if ExcelDataReader didn’t apply any formatting up front, but instead let users retreive the raw values and formats and apply formatting as needed. F.ex through one or two new public IExcelDataReader methods GetRawValue()
and GetRawFormat()
This would be key to address the above issues; providing a more flexible mechanism to apply formatting as needed. This is also an opportunity to refactor/unify the reader internals dealing with OADates and formatting. There are some concerns with backwards compatibility for existing users doing formatting trickery.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15
Top GitHub Comments
Right, that would be cool. I assume it would also work with DateTime formatting as well?
As long as I can get real formatted strings from ExcelDataReader, I am cool. That’s the main thing we need, is to be able to read strings and have them formatted correctly.