In certain cases, worksheets seemed to get damaged when saved through aspose.cells4java.
At least MS Excel complained about a damaged worksheet within the file when opening. After some time of debugging, I found the root of the problem and created a minimalistic testcase:
public static void main(String[] args) throws Exception
{
Workbook wb = new Workbook();
Cells c = wb.getWorksheets().get(0).getCells();
// Works
c.getRows().get(0).get(0).getValue();
// Uncomment this line to obtain a damaged Workbook:
// c.getRows().get(0).get(-1).getValue();
wb.save("D:/temp/out.xlsx");
}
As soon as someone calls method “.get()” on a Row-object with a negative value, the saved worksheet is reported damage afterwards.
I testet this with Version 21.4 and 22.4 (the lastet version as of creating this post). Same outcome for both versions.
Can you confirm the issue?