question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose cell format information

See original GitHub issue

Some 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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:15

github_iconTop GitHub Comments

1reaction
kendallbcommented, Oct 21, 2017

Right, that would be cool. I assume it would also work with DateTime formatting as well?

0reactions
kendallbcommented, Nov 22, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the format of a cell
Select the cells with the Excel Style. Right-click the applied style in Home > Cell Styles. Select Modify > Format to change what...
Read more >
Excel: Formatting Cells
Basic formatting in Excel can customize the look and feel of your Excel spreadsheet. Learn about formatting cells in Excel here.
Read more >
Excel format for number, text, scientific notation, accounting ...
The tutorial explains the basics of Excel format for number, text, currency, percentage, accounting number, scientific notation, and more.
Read more >
How To Format Cells In Excel
Start by selecting the cells you want to modify. · On the Home tab, select Format > Format Cells, which will open the...
Read more >
Cell Styles in Excel: The Complete Guide
A cell style is a preset format that allows you to visually represent data with variations in color, cell borders, alignment, and number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found