sheet.Cell("B3").InsertData(table.AsEnumerable()) doesn't apply a user defined cell format
See original GitHub issueThis attached excel has a cell which is set a user defined cell format “yy/MM/dd”. format test.xlsx
But the following code doesn’t apply it when you open a saved file. It shows “2016/10/4” instead of “16/10/4”. You need to manually click and leave the cell to affect the format.
var table = new System.Data.DataTable();
table.Columns.Add("Date");
table.Rows.Add("2016/10/4");
sheet.Cell("B3").InsertData(table.AsEnumerable());
But this code does work well. It shows “16/10/4” properly.
sheet.Cell("B3").Value = "2016/10/4";
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Why Table Number Formatting Doesn't Copy Down and ...
Learn why the number formatting for new rows of a table doesn't always get copied down and how to fix it.
Read more >Create and apply a custom number format
Apply a custom number format · Select the cell or range of cells that you want to format. · On the Home tab,...
Read more >Excel conditional formatting formulas based on another cell
Today are going to dwell on how to use Excel formulas to format individual cells and entire rows based on the values you...
Read more >Format of a Cell, unrecognized number until I hit enter
I have a table that is created from a query. The query goes to a spreadsheet that I do not own. Within that...
Read more >Apply Conditional Formatting to Multiple Cells with a Single ...
This means that you will not have to individually apply the formulas when ... Excel How To: Format Cells Based on Another Cell...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I confirmed that the bug was fixed. Thanks a lot!
The PR has been merged into the
develop
branch. I’d appreciate it if you could pull thedevelop
branch and check that it solves your issue. Thanks.