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

New Post: Cell(1).Value throws exception - cell with formula

$
0
0
When I reading cell(with formula) using .value() , it throws an exception. So i used .valueCached. But when using valueCached it returns null . Below is ma code
var array = new object[colCont];
for (int y = 1; y <= colCont; y++)
{
      try
       {
                if (item.Cell(y).FormulaA1 == "")
                      array[y - 1] = item.Cell(y).Value;
                 else
                       array[y - 1] = item.Cell(y).ValueCached;
        }
        catch
         {
         }
 }        
Please advise.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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