I'm converting XLSB file into PDF file using Java spire.office-8.3.5 API.
The source file "Portfolio Valuation Model- Permira_Dec 22_Omnicare.xlsm" has been ended in error without converting a file.
java.lang.NullPointerException: Cannot read field "spr‰" because the return value of "com.spire.xls.core.converter.spreadsheet.extensions.ExternalSheetCollection.spr⌹—(int)" is null
at com.spire.xls.core.converter.spreadsheet.extensions.ExternalSheetCollection.spr╋┈(Unknown Source)
at com.spire.office.packages.sprdyf.spr㈬⃝│(Unknown Source)
at com.spire.office.packages.sprdyf.spr⑉│(Unknown Source)
at com.spire.office.packages.sprdyf.spr⑉│(Unknown Source)
The error line shows this code
- Code: Select all
if (worksheet.getPivotTables().getCount() == 0) {
worksheet.CalculateAllValue();
}
This code has been given from the support team to resolve one of my issues. I tried commenting this code and execute this and end up with the same error on saving to file.
The sample source code and screenshot of the log detail are attached for your reference.
I could not upload the source file in this thread. I will share the same to the support email.
I appreciate your help on this.