Hi,
Hi,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue after running your sample code with the latest version: Aspose.Cells
for Java v8.5.0.2. The code throws exception when there are more than 65536 iterations. However, this might be some limitation of excel itself.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSJAVA-41396 - Calculating formulas not working when we have more than 65356 named cells
Hi,
Thanks for using Aspose.Cells for Java.
Please download and try this fix: Aspose.Cells for Java v8.5.0.4 and let us know your feedback.
Hi,
Hi Anderson Kruger,
e.g
Sample code:
File file = new File(“f:/files/file1.xlsx”);
Workbook workbook = new Workbook(FileFormatType.XLSX);
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.get(0);
//LIMIT 65535
for (int i = 0; i < 65536; i++) {
final Cell c = worksheet.getCells().get(i, 1);
c.setValue(35);
final Range r = worksheet.getCells().createRange(i, 1, 1, 1);
r.setName(“range” + i);
// this way it works
// final Cell cFormula = worksheet.getCells().get(i, 2);
// cFormula.setFormula(“B” + (i+1) + “* 2”);
final Cell cNamedFormula = worksheet.getCells().get(i, 3);
cNamedFormula.setFormula(“range” + i + “* 2”);
}
// it fails here, but if comment this line will
workbook.calculateFormula(false);
OutputStream output = new FileOutputStream(file);
// also fails here too
workbook.save(output, new OoxmlSaveOptions(SaveFormat.XLSX));
The issues you have found earlier (filed as CELLSJAVA-41396;CELLSJAVA-41405) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.