Hi,
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.
Hi,
I received a forwarded email with your reply 946907 but that reply seems not to be available / visible, hence I reproduce it here:
View the complete topic at: 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.
C#
Workbook workbook = new Workbook("sample.xlsx");
PivotTable pt = workbook.Worksheets["OS_OutPut_Pivot_Current"].PivotTables[0];
//Commenting these two lines will not calculate GETPIVOTDATA() formula
pt.RefreshData();
pt.CalculateData();
workbook.Worksheets["PRIMEPOS COMBINED"].IsVisible = false;
workbook.CalculateFormula();
workbook.Save("output-normal.pdf");
Shakeel,
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)
regards
Jacques
Hi Jacques,
Hi,
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.
Attached is:
* 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 16.11.0.0
thank you
Jacques
Hi,
Hi,
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,
thank you
Jacques
Hi,
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.