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

New Post: Disable auto formating creating a Excel file

$
0
0
Hi,

I have a problem that some values look like dates ("12-01-00-06") and the api is converting them to custom date time format and messes the data up.

I have tried this:
worksheet.Cell("A2").DataType = XLCellValues.Text;

but this doesn't help and in debugger I see that after I assign the value then te dataType is set to DateTime.

How can I disable auto formattingfrom my sheet and show values as they are.
In Excel I also see that that the format is set to custom dateTime.

Kristjan.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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