https://bz.apache.org/bugzilla/show_bug.cgi?id=60227

--- Comment #9 from Hasitha <hasitha.gunasin...@iicorporate.com> ---
(In reply to Javen O'Neal from comment #5)
> 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 [details]) 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 [details] 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?

yes. I do get the error when I ran your unit test code and opened the file in
Microsoft Excel.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main";><logFileName>error157560_01.xml</logFileName><summary>Errors
were detected in file 'D:\downloads\test (1).xlsx'</summary><removedRecords
summary="Following is a list of removed records:"><removedRecord>Removed
Records: Shared formula from /xl/worksheets/sheet1.xml
part</removedRecord><removedRecord>Removed Records: Formula from
/xl/calcChain.xml part (Calculation
properties)</removedRecord></removedRecords></recoveryLog>

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

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

Reply via email to