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

New Post: Unable to get format data cell using closexml

$
0
0
I'm having problems getting Excel to format cells using closedxml.

My Excel cell is formatted as short date however when I check datatype it gives me string instead of date (or datetime).

I have tried to get format type in this way:

foreach (var item in wRange.Rows())
{
  var array = new object[wCol];
                for (int y = 1; y <= wCol; y++)
                {
                    try
                    {
                        var t = item.Cell(y).Value;
and item.Cell(y) gives me string instead of datetime.

Why is my cell not DateTime type? How do I get it to format as short date?

Thanks

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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