workbook.CalculateFormula() doesn't calculate the values in my workbook


Hello,

I've got an excel file with some sales-data. One sheet (called 'Report') shows some totals and graphs. The results in this report sheet are dependent on one parameter (clientname), which can be entered in a specific cell.
I use Aspose cells to open this excel file, put the client name in the right cell, and save the report sheet as a pdf file. My problem is that the values in the report are not recalculated when the clientName cell is changed. Calling the method workbook.CalculateFormula() doesn't help...

I attached the excel I'm using. The source code is copied below. What am I doing wrong?? Or is there something wrong in the excel file?

Kr,
Stijn Van Assche

---
const string clientName = "client2";

var workbook = new Workbook(AppDomain.CurrentDomain.BaseDirectory + "contract templates.xlsx");

// put the client name in excel
workbook.Worksheets["Calculations"].Cells["A3"].PutValue(clientName);
workbook.CalculateFormula(true);

// hide all sheets, except the 'report' sheet
workbook.Worksheets["Sheet1"].IsVisible = false;
workbook.Worksheets["data"].IsVisible = false;
workbook.Worksheets["Calculations"].IsVisible = false;
workbook.Worksheets["Totals"].IsVisible = false;
workbook.Worksheets["Values"].IsVisible = false;

// save to pdf
workbook.Save(string.Format("{0}output_{1}.pdf", AppDomain.CurrentDomain.BaseDirectory, clientName), SaveFormat.Pdf);
---

Hi,

After an initial test using your sample code with template file, I can find the issue as you have mentioned.

We will figure your issue out soon.

I have logged your issue into our issue tracking system with an id: CELLSNET-19055.

Thank you.

Hi,

<span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;”>We have fixed the
issue of calculating formulas. Please try the attached version.

Thank you.


Hello,


Thanks for your quick reply. Everything works fine now with the dll you included. Thx a lot!


Kr,
Stijn Van Assche

The issues you have found earlier (filed as 19055) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.