Have the following code that was working in 21.2 Java Aspose.Cells version:
The simply iterates over all worksheets. If there is a table on the worksheet (ListObject), it simply deletes the column at index 1. It is attentionally using the Cells.delete column API.
This was working on 21.2 version. Once we upgraded to 21.3 version, the Cells.deleteColumn link throws and exception:
Cannot read field “c” because “” is null
Attached is the Excel file.
for (Object obj : workbook.getWorksheets()) {
Worksheet worksheet = as(Worksheet.class, obj);
ListObjectCollection tables = worksheet.getListObjects();
for (int i=0;i<tables.getCount();i++){
Cells cells = worksheet.getCells();
cells.deleteColumn(1); // exception here in 21.3 version.
}
}
}
Update: Just tried the .NET version - also exception.
dimtable.zip (13.5 KB)
@eyalmolad,
We have observed the issue and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.
This issue is logged as:
CELLSJAVA-43431 - java.lang.NullPointerException raised while calling Cells.deleteColumn() with the latest version 21.3 whereas it works with 21.2
@eyalmolad,
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.
Thank you very much.
Looking forward to testing it.
Thanks
@eyalmolad,
You are welcome.
Hopefully, we will provide the fix before the end of this week.
Keep in touch.
@eyalmolad,
Please try our latest version/fix: Aspose.Cells for Java v21.3.8 (attached)
aspose-cells-21.3.8-java.zip (7.3 MB)
Your issue should be fixed now.
Hello,
Yes - the bug is fixed now.
When would we be able to retrieve this update from the official repository?
Thank you.
Eyal
@eyalmolad,
You will get it in the next week.
The issues you have found earlier (filed as CELLSJAVA-43431) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi