poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60227] Cannot update more than 2 existing formulas
Date Sat, 08 Oct 2016 21:57:55 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60227

Javen O'Neal <onealj@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Javen O'Neal <onealj@apache.org> ---
I had no issues opening the file in LibreOffice after executing the following
code.
Looking at the error message from comment 0, there may be an issue with
overwritten shared formulas not getting removed from the workbook. However, the
example workbook (attachment 34339) does not appear to have these shared
formulas.

Added to TestXSSFBugs.java:
@Test
public void test60227() throws Exception {
    XSSFWorkbook wb = (XSSFWorkbook) WorkbookFactory.create(new
File("/tmp/bug60227.xlsx"));
    Sheet sheet = wb.getSheetAt(0);
    for (int index = 0 ; index < 10; index++){
        Row row = sheet.getRow(index);
        Cell cell = row.getCell(0);
        cell.setCellFormula("SUM(200)");
    }
    OutputStream fos = new FileOutputStream("/tmp/bug60227-out.xlsx");
    wb.write(fos);
    fos.close();
    wb.close();
}

Using the test.xlsx file from attachment 34339 and the unit test that I wrote
based on your description from comment 0, do you still get an error in Excel,
and if you do, can you submit that error message?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message