Please try our latest fix/version: Aspose.Cells for Java v16.12.6
I have tested your scenario/ case using your newly attached files, it works fine with v16.12.6. I have used your original code with your new files:
e.g
Sample code:
//New workbook with document
Workbook workbook = new Workbook(“InvalidColumn_3.xlsx”);
//For each sheet
for (int i = 0; i<workbook.getWorksheets().getCount(); i++) {
//Get sheet
Worksheet worksheet = workbook.getWorksheets().get(i);
//Sheet render
ImageOrPrintOptions printOpts = new ImageOrPrintOptions();
SheetRender sr = new SheetRender(worksheet, printOpts);
}
Let us know if you still have any issue with v16.12.6.
After an initial test, I observed the issue as you mentioned by simply opening and resaving the files (InvalidColumn_2.xlsx and InvalidColumn_3.xlsx). I found an exception: java.lang.ArrayIndexOutOfBoundsException on Workbook.save() method: e.g Sample code:
Workbook workbook = new Workbook(“InvalidColumn_2.xlsx”); workbook.save(“out1.xlsx”);
I have logged a ticket with an id “CELLSJAVA-42143” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
Good to know that your issue is sorted out by the new fix/version. Feel free to write us back if you have questions or comments, we will be happy to assist you soon.