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.

CalculatedValue with Named Ranges in Formula

Thread ID:

Created:

Updated:

Platform:

Replies:

103627 May 18,2012 02:43 AM May 18,2012 07:36 AM Silverlight 1
loading
Tags: XlsIO
Matthew
Asked On May 18, 2012 02:43 AM

Hey, I like XlsIO and all; I find it very easy and convenient to use! The CalculatedValue is a very strong bonus for this... because getting calculated values on Excel seem a little hard.

CalculatedValue seems to work fine with formulae like =A1+A2, but when I apply Named Ranges into the formula (e.g. =Var1+Var2), my CalculatedValue returns me an empty string although the calculated value shows nicely on the Spreadsheet control.

Please do tell me if I'm doing anything wrong, or that CalculatedValue does not work with named ranges at this point of time. Thanks! :)

Manoj Kumar G M [Syncfusion]
Replied On May 18, 2012 07:36 AM

Hi Matthew,

Thank you for choosing Syncfusion products.

Essential XlsIO includes support for enabling the calculations of Essential Calculate supported formulas that are added at runtime to the worksheet and the computed value will be set to the “CalculatedValue” property associated to the “IRange” object. The following code snippet illustrates how to enable the sheet formula calculations.

[C#]

IWorksheet sheet = workbook.Worksheets[0];

//Formula calculation is enabled for the sheet.

sheet.EnableSheetCalculations();

string computedValue = sheet.Range["C1"].CalculatedValue;

Please go through our documentation in the link below.

http://help.syncfusion.com/UG/Reporting/XlsIO/Windows%20Forms/default.htm#!Documents/addingcalculationenginetoanapplication.htm

We have attached the sample in the below link. Please make use of this sample and let us know if this helps you.

SampleLink:

http://www.syncfusion.com/downloads/Support/DirectTrac/93766/NamedRanges-1274090944.zip

Please let us know if you require any further clarifications.

Regards,
Manojkumar.

 


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.

;