I'm converting the XLSM file into a PDF file using Java Spire.office-8.10.2 API.
The source file "CivicPlus.xlsm" has been ended in error without converting a file.
The program gets an error on loading from a file itself.
- Code: Select all
workbook.loadFromFile(file.getPath());
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48)
at java.base/java.lang.String.charAt(String.java:1513)
at com.spire.office.packages.sprpqf.spr∯⌹(Unknown Source)
at com.spire.office.packages.spricg.spr⌮┃(Unknown Source)
at com.spire.office.packages.spricg.spr┶┄(Unknown Source)
at com.spire.office.packages.spricg.spr┹┃(Unknown Source)
The sample source code and a screenshot of the log details are attached.
I could not upload the source file in this thread. I will share the same with the support email.
I appreciate your help on this.