Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

New Post: How to read cell text when formula is attached to cell.

$
0
0
Hello,

I am reading a excel file using NPOI dll. This excel file have few cells which have formulas associated with it. now when i read the cell value it return the formula instead of actual text.

Here is my code.

ICell cell = row.GetCell(i);
            if (cell == null)
            {
                dr[i] = null;
            }
            else
            {
                dr[i] = cell.ToString(); // This line returning the "M16" instead of 18.00
            }

Please let me know if anyone knows how to read the actual text of the cell.

Viewing all articles
Browse latest Browse all 1621

Trending Articles



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