https://bz.apache.org/bugzilla/show_bug.cgi?id=60227
Bug ID: 60227
Summary: Cannot update more than 2 existing formulas
Product: POI
Version: 3.15-FINAL
Hardware: PC
OS: Windows NT
Status: NEW
Severity: blocker
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
I am reading a file using the following code
String strFile = "C:\\usr\\_excel_\\test.xlsx";
FileInputStream file = new FileInputStream(new File(strFile));
XSSFWorkbook workbook = new XSSFWorkbook(file);
Then I try to update an existing formula on column 1 for more than 2 rows using
for(int index = 0 ; index < 10; index++){
Row row = sheet.getRow(index);
Cell cell = row.getCell(0);
cell.setCellFormula("SUM(200)");
}
It updates the cell with the new formula, but when we try to open the excel
file, I get
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error072480_01.xml</logFileName><summary>Errors
were detected in file 'D:\downloads\eurest (21).xlsm'</summary><removedRecords
summary="Following is a list of removed records:">
<removedRecord>Removed Records: Shared formula from /xl/worksheets/sheet6.xml
part</removedRecord>
<removedRecord>Removed Records: Formula from /xl/calcChain.xml part
(Calculation properties)</removedRecord></removedRecords></recoveryLog>
NOTE: it works well if I change the for loop condition to index<3 and update
only 2 cells.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]