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.

Can not find function: RefreshCalcEngine

Thread ID:

Created:

Updated:

Platform:

Replies:

66997 Aug 7,2007 03:38 AM Aug 8,2007 08:18 AM Windows Forms 3
loading
Tags: XlsIO
Khai Tran
Asked On August 7, 2007 03:38 AM

Dear,
I want to calcualted excel file before saving it by XlsIO.
Some one (in forums) use RefreshCalcEngine function to calculate, but I could not find that function.

Can you help me to solve my problem.
Thanks,
Khai.

Melba Winshia [Syncfusion]
Replied On August 7, 2007 06:11 AM

Hi Khai,

Thank you for your interest in Essential XlsIO.

You should use Essential Calculate along with Essential XlsIO to calculate before saving the file.

[C#]

//Inserting sample text
sheet.Range["A1"].Number = 10.99;
sheet.Range["B1"].Number = 10;
sheet.Range["C1"].Formula = "A1+B1";
sheet.Range["D1"].Formula = "AVERAGE(A1:B1)";

//Refresh the calculation engine. The second parameter is true since this is the
//first time we are calling this.RefreshCalcEngine
this.RefreshCalcEngine(workbook,true);

Please refer the sample in the below link which illustrates the above.

http://websamples.syncfusion.com/samples/XlsIO.Windows/66997/main.htm

Please try running the above sample and let me know if this helps.

Thanks,
Melba




Khai Tran
Replied On August 7, 2007 10:25 PM

Thanks for your reply,
but when I create new object XlsIOCalcWorkbook

Dim cwb As XlsIOCalcWorkbook = New XlsIOCalcWorkbook(sheets, ranges)

it has an error: "Object reference not set to an instance of an object." in function:

Public Sub New(ByVal calcSheets() As XlsIOCalcSheet, ByVal namedRanges As Hashtable)
MyBase.New(calcSheets, namedRanges)
End Sub

I don't know why.
Can your help me one more time.
Thank you very much.
Khai.

Melba Winshia [Syncfusion]
Replied On August 8, 2007 08:18 AM

Hi Khai,

Thank you for posting your query to us.

I am afraid that I was not able to reproduce the issue. Please refer to the following steps that I tried to reproduce it.

1. Created a vb sample to calculate formulas before saving by creating new object XlsIOCalcWorkbook
2. Run the sample
3. No Exception

Also I have created a simple sample to test this issue and it is available in the following link.

http://websamples.syncfusion.com/samples/XlsIO.Windows/66997_1/main.htm

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample or send us the reproducing steps so that we could sort out the cause of the issue and provide you a solution?

Thanks,
Melba

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.

;