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.
Unfortunately, activation email could not send to your email. Please try again.

Reading cells with formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

43170 Apr 17,2006 08:44 PM Apr 19,2006 11:27 AM Windows Forms 1
loading
Tags: XlsIO
fmedina
Asked On April 17, 2006 08:44 PM

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 11:27 AM

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

CONFIRMATION

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.

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.

;