Evaluating formulas before exporting

Hey,

first of all, thank you for your answer earlier, it helped me a lot.
Now for my question:
I want to export a graph to a picture, but my graph is based on a couple of formulas. I wanted to know if before exporting the picture, the formulas are being evaluated (so the graph I will see in the picture will be based on the new data), or maybe the data in the graph will be the last data shown when I last opened the excel file (or when I last evaluated the formulas).

I hope I was clear enough. If not tell me, and I’ll try explaining myself better.

Thank you

Hi,

Thanks for your posting and using Aspose.Cells.

If you have formulas in your workbook then before you do anything, you should first call Workbook.calculateFormula() method and if you somehow changes your formula then before saving you should call Workbook.calculateFormula(). Means, you should call any time when you want to calculate the formulas.

Here is a sample code how to call this method.

Java
Workbook wb = new Workbook(sampleFile);
wb.calculateFormula();
//Now export your graph to picture