Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Mar 19, 2015 1:51 pm

Hi,

I am trying to use the calculateAllValue() method, then read the cells where values should now be calculated from formulas, but it still returns the formulas instead of the values.

If I save to excel and open the file, the calculated values are correctly displayed.

Is there a way to really calculate the whole workbook, refreshing all values following changes to cell values/formulas, without having to save to excel file? This is exactly what we are trying to avoid, opening and closing excel files.

I used the WriteFormulas example from your samples, and added this after all the cell changes :
Code: Select all
workbook.CalculateAllValue();
MessageBox.Show(sheet.Range[13, 2].Value);


It returns "=Count(3,5,8,10,2,34)"

Thank you.

carlvaillancourt
 
Posts: 5
Joined: Wed Mar 18, 2015 8:19 pm

Fri Mar 20, 2015 7:51 am

Hello,

Thanks for your inquiry.
Please try the flowing code:
Code: Select all
workbook.CalculateAllValue();
MessageBox.Show(sheet.Range[13, 2].FormulaValue.ToString());


Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Mar 20, 2015 5:08 pm

Excellent, it works.

Unfortunatly the calculateAllValue takes 2 minuts to process on our complex excel file ( 18 sheets and hundreds of formula with links between sheets, dsums, etc...). :(

carlvaillancourt
 
Posts: 5
Joined: Wed Mar 18, 2015 8:19 pm

Mon Mar 23, 2015 3:59 am

Hello,

Please send us your source file to help us reproduce your issue quickly and resolve it.
Please feel free to contact us if you have any problems.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Mar 24, 2015 12:53 pm

Hi, thank you for your support, we won't be able to send you our file, it contains too much private informations. You can close the issue, we are looking at other solutions.

carlvaillancourt
 
Posts: 5
Joined: Wed Mar 18, 2015 8:19 pm

Thu Mar 26, 2015 4:00 am

Hello,

Please feel free to contact us, if you have any questions or needs. We are here for help.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.XLS