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

New Post: How do I stop getting the "number stored as text" message?

$
0
0
I've tried many different methods, but I've had no luck. This is the code I'm using to add the value to the cell
ws.Cell(baseCell).Value = NumberValue;
ws.Cell(baseCell).Style.NumberFormat.SetNumberFormatId(37);
ws.Cell(baseCell).SetDataType(XLCellValues.Number);
I've tried it with several datatypes for "NumberValue" including double, decimal, and float.
I've also tried changing the cell datatype from number to text.

No matter what I do I always get the message. The data I'm using to create the document is all numeric values, so the entire sheet has flags.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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