Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Reopened Issue: "NaN" causes unreadable content error [8403]

$
0
0
I was getting "Excel found unreadable content" errors in some of my workbooks, but I finally tracked down the issue. To reproduce, start a new workbook and add "NaN" to one of the cells:

Dim wb As New XLWorkbook()
Dim ws As IXLWorksheet = wb.Worksheets.Add("Test")
ws.Cell(1, 1).Value = "NaN"

Upon opening the file, you'll get the "unreadable content" error. If you choose to repair the file, it will then show "NaN" in the cell as expected.

I compared the orignial and repaired versions of xl\SharedStrings.xml, and "NaN" wasn't present in the original file - could that have something to do with it?

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>