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

--- Comment #15 from Davide Angelocola <[email protected]> ---


(In reply to Dominik Stadler from comment #2)
> This works for me with LibreOffice on Linux, can you provide details about
> your environment?
> 
> Also does the following unit test pass?
> 
>     @Test
>     public void test61905xlsx() throws IOException {
>         Workbook wb = new XSSFWorkbook();
>         checkActiveSheet(wb, XSSFITestDataProvider.instance);
>         //wb.write(new FileOutputStream("/tmp/yyy.xlsx"));
>         wb.close();
>     }
> 
>     @Test
>     public void test61905xls() throws IOException {
>         Workbook wb = new HSSFWorkbook();
>         checkActiveSheet(wb, HSSFITestDataProvider.instance);
>         //wb.write(new FileOutputStream("/tmp/yyy.xls"));
>         wb.close();
>     }
> 
>     private void checkActiveSheet(Workbook wb, ITestDataProvider instance)
> throws IOException {
>         Sheet sheet = wb.createSheet("new sheet");
>         sheet.setActiveCell(new CellAddress("E11"));
>         assertEquals("E11", sheet.getActiveCell().formatAsString());
> 
>         Workbook wbBack = instance.writeOutAndReadBack(wb);
>         sheet = wbBack.getSheetAt(0);
>         assertEquals("E11", sheet.getActiveCell().formatAsString());
>         wbBack.close();
>     }

This test is passing on apache-poi 3.15:

    @Test
    public void test61905xls() throws IOException {
        Workbook wb = new HSSFWorkbook();
        Sheet sheet = wb.createSheet("new sheet");
        sheet.setActiveCell(new CellAddress("E11"));
        assertEquals("E11", sheet.getActiveCell().formatAsString());
        wb.write(new FileOutputStream("/tmp/zzz.xls"));
        wb.close();

        Workbook wbBack = new HSSFWorkbook(new
FileInputStream("/tmp/zzz.xls"));
        sheet = wbBack.getSheetAt(0);
        assertEquals("E11", sheet.getActiveCell().formatAsString());
        wbBack.close();
    }

-- 
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]

Reply via email to