These's an XLSX file on my computer which cannot get loaded by Spire Office.
Here's the file:
[ ENV ]
OS: Windows 10 Pro 2004
JRE: OpenJDK Runtime Environment (build 1.8.0_275-b01)
Free Spire.Office for Java (3.9.0)
Here's the testing code:
[ Src Code ]
- Code: Select all
import com.spire.xls.*;
import java.io.*;
public class ExcelToImage {
public static void main(String[] args) throws IOException {
//Create a workbook instance
Workbook workbook = new Workbook();
//Load the Excel file
workbook.loadFromFile(args[0]);
//Get the first worksheet
Worksheet sheet = workbook.getWorksheets().get(0);
//Save the sheet to image
sheet.saveToImage("image.png");
}
}
[ Error ]
- Code: Select all
Exception in thread "main" class com.spire.office.packages.sprxua: DocPropsCustom root element eror
com.spire.office.packages.sprxhA.spr (Unknown Source)
com.spire.office.packages.sprxhA.spr (Unknown Source)
com.spire.office.packages.sprRIA.spr (Unknown Source)
com.spire.office.packages.sprRIA.spr (Unknown Source)
com.spire.office.packages.sprThA.spr (Unknown Source)
com.spire.office.packages.sprrua.spr (Unknown Source)
com.spire.office.packages.sprrua.spr (Unknown Source)
com.spire.office.packages.sprrua.<init>(Unknown Source)
com.spire.xls.core.spreadsheet.XlsWorkbook.<init>(Unknown Source)
com.spire.xls.Workbook.loadFromFile(Unknown Source)
com.spire.xls.Workbook.loadFromFile(Unknown Source)
ExcelToImage.main(ExcelToImage.java:9)
at com.spire.office.packages.sprxhA.spr (Unknown Source)
at com.spire.office.packages.sprxhA.spr (Unknown Source)
at com.spire.office.packages.sprRIA.spr (Unknown Source)
at com.spire.office.packages.sprRIA.spr (Unknown Source)
at com.spire.office.packages.sprThA.spr (Unknown Source)
at com.spire.office.packages.sprrua.spr (Unknown Source)
at com.spire.office.packages.sprrua.spr (Unknown Source)
at com.spire.office.packages.sprrua.<init>(Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.<init>(Unknown Source)
at com.spire.xls.Workbook.loadFromFile(Unknown Source)
at com.spire.xls.Workbook.loadFromFile(Unknown Source)
at ExcelToImage.main(ExcelToImage.java:9)
Please help me handle the problem. Thanks