Dear Aspose.Cells Support Team,
We are encountering a critical issue when converting an XLSX workbook to PDF using Aspose.Cells. Specifically, several modern Excel dynamic array formulas, which work correctly in the source XLSX file, are displaying errors (#NAME?
or #VALUE!
) in the generated PDF output instead of their calculated values. This significantly impacts the usability of our PDF documents.
Our source XLSX workbook contains the following formulas, and here’s their observed behavior in the PDF output:
OFFSET
: Appears to work correctly.SEQUENCE
: Appears to work correctly.INDEX
+SEQUENCE
: Appears to work correctly.FILTER
: Appears to work correctly.UNIQUE
: Appears to work correctly.SORT
: Shows#VALUE!
errors in the PDF.SORTBY
: Appears to work correctly.VSTACK
/HSTACK
: Shows#NAME?
errors in the PDF.TRANSPOSE
: Appears to work correctly.CHOOSECOLS
/CHOOSEROWS
: Shows#NAME?
errors in the PDF.TOCOL
/TOROW
: Shows#NAME?
errors in the PDF.TEXTBEFORE
/TEXTAFTER
: Shows#NAME?
errors in the PDF.TEXTSPLIT
: Shows#NAME?
errors in the PDF.RANDARRAY
: Appears to work correctly.
This indicates that Aspose.Cells might not be evaluating or rendering these specific dynamic array formulas correctly during the conversion process from XLSX to PDF.
Important Note: We have tested this same conversion process with Aspose.Cells for Java version 24.5, and the issue does not occur; the formulas are rendered correctly in the PDF.
Given this, could you please advise on how to resolve this issue in version 22.12? Is there a known workaround or configuration change we can apply to make these formulas work in version 22.12, or is upgrading to a newer version (like 24.5) the only solution?
We urgently need the PDF output to accurately reflect the calculated values from these dynamic array formulas as they appear in the original XLSX file.
To help you troubleshoot, here are the details of our setup and the code snippet we are using:
- Aspose.Cells Version: Aspose.Cells for Java 22.12 (Issue observed)
- Operating System: macOS 15.5
- Development Environment: IntelliJ IDEA
- Programming Language: Groovy
Code Snippet:
Workbook workbook = new Workbook("formulas.xlsx");
for (int i = 0; i < workbook.getWorksheets().getCount(); i++) {
Worksheet sheet = workbook.getWorksheets().get(i);
PivotTableCollection pivots = sheet.getPivotTables();
for (int j = 0; j < pivots.getCount(); j++) {
PivotTable pivot = pivots.get(j);
pivot.refreshData();
pivot.calculateData();
System.out.println("Refreshed pivot: " + pivot.getName());
}
}
workbook.calculateFormula();
workbook.refreshDynamicArrayFormulas(true);
for (int i = 0; i < workbook.getWorksheets().getCount(); i++) {
if (!workbook.getWorksheets().get(i).getName().startsWith("_")) {
workbook.getWorksheets().get(i).setVisible(true);
System.out.println(workbook.getWorksheets().get(i).getName());
} else {
workbook.getWorksheets().get(i).setVisible(false);
}
}
workbook.save("output.pdf", SaveFormat.PDF);
We have attached the problematic PDF output and the xlsx file in the following zip:
pdf_and_excel.zip (87.6 KB)
Thank you for your time and urgent assistance.
Sincerely,
Kiran Karki