Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Get the result of a formula cell
posted

How can I interogate/read the resulting value of a cell which contains a formula?

When I look at WorkBook.Worksheets[0].Rows[15].Cells[1].Value I see the formula.  What I want to see is the resulting value.

Parents
No Data
Reply
  • 4960
    posted

    I think because the .XLS file stores the formula, not the calculated value [1], you would need to parse the formula to calculate a resulting value.  The Infragistics.Excel class library API wraps the file for I/O purposes, but it doesn't tabulate the spreadsheet as a spreadsheet application would.

    [1] - This may not apply to worksheet "snapshots" served by Excel Server 2007 where I believe formula results may be cached, but these are a different animal.

Children