We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reading cells with formulas

Thread ID:





43170 Apr 18,2006 12:44 AM UTC Apr 19,2006 03:27 PM UTC WinForms 1
Tags: XlsIO
Asked On April 18, 2006 12:44 AM UTC

Hi! Is there a way to get the value from a cell that contains a formula? var = ws.Range(r, c).Value "var" gets the formula as a string or I get an error. Thanks for your help.

Administrator [Syncfusion]
Replied On April 19, 2006 03:27 PM UTC

Hi Fmedina, Sorry for the delay in getting you. The code var = ws.Range(r, c).Value gives Formula string,as the Value property gets or sets the variant and not the number value. The error while using the above code may occur if XlsIO doesnot support that particular formula. Here is the code to read the value from a cell that contains formula. string str=sheet.Range["A3"].FormulaNumberValue.ToString() Please see the attachment and let me know if you need any further assistance. ReadFormulaValue.zip BestRegards, Bharath


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon