We use Aspose like a mail-merge engine:
1. Users provide an Excel XLSX file that serves as a template
2. Users provide data in the form of CSV files
3. Our application populates certain sheets of the XLSX template with the data
4. Our application re-calculates the resulting XLSX
5. Our application stores the resulting XLS, and allows users to download it
See attached files:
* the template = OS Report Clean.xlsx
* the data = PRIMEPOS COMBINED.csv
For the merge application, see post 708524
For the cell with the error, see sheet “Output”, cells F9 and F10.
Once the data is loaded on sheet “PRIMEPOS COMBINED”, our application recalculates the pivot and the spreadsheet.
The pivot table on sheet “OS_OutPut_Pivot_Current” is correctly recalculated, but the formulas on sheet “Output”, cells F9 and F10 are not. They keep their old values.
I received a forwarded email with your reply 946907 but that reply seems not to be available / visible, hence I reproduce it here:
the complete topic at: http://www.aspose.com/community/forums/thread/806947.aspx
Posted By: shakeel.faiz in Aspose.Cells Product Family
Subject: Re: Formulas with GETPIVOTDATA are not being recalculated even though the pivot itself is
Thanks for your posting and using Aspose.Cells.
We have looked into this issue and found that the latest version: Aspose.Cells for .NET 16.11.0 is working fine.
Please check the sample.xlsx file, if you open it and check the cells F9, you will see #REF! and then execute the following code after commenting the two mentioned lines and then without commenting those lines. And the check the output pdfs i.e. output-normal.pdf and output-aftercommenting.pdf.
When you will open the normal pdf, you will see GETPIVOTDATA() has been calculated successfully.
Workbook workbook = new Workbook("sample.xlsx");
PivotTable pt = workbook.Worksheets["OS_OutPut_Pivot_Current"].PivotTables;
//Commenting these two lines will not calculate GETPIVOTDATA() formula
workbook.Worksheets["PRIMEPOS COMBINED"].IsVisible = false;
thank you for your suggestion: By first recalculating the pivots and then recalculating the spreadsheet the correct numbers were shown (and also upgrading to 16.11.0)
Even though re-calculating a few GETPIVOTDATA cells does work now, the re-calculation does not work for the attached spreadsheet.
When using Calculationchain OFF, the formulas return "#REF!"
When using Calculationchain ON, the formulas are not recalculated, the answer is the same as before recalculating.
Excel recalculates these cells without issue.
* Executable = our code to recalculate
* Standalone generator code = source code of above
* Input.xlsx = file to use with executable; cells do not get recalculated or return #REF!
* ExampleOutput.xlsx = output after recalculation, with #REF!
We’re using 22.214.171.124
The file called
“ExampleOutput.xlsx” has #REF! errors when I open it. First set recalculation to Manual before opening it, and do NOT recalculate it, because Excel is able to calculate these formulas. See screenshot ExampleOutput.png
When running the stand-alone generator, use the file “input.xlsx”.
* screenshot of XLSX before running through generator = “input_before.png”
* screenshot of running the generator = “aspose_generator.png”
* screenshot of XLSX after running through generator = "input_after.png"
hope this helps,
The issues you have found earlier (filed as CELLSNET-45009) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Thank you - we will test this.