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

--- Comment #5 from Javen O'Neal <one...@apache.org> ---
@Test
public void testActiveSheetIsHidden() throws IOException {
    Workbook wb = _testDataProvider.createWorkbook();
    wb.createSheet("First Sheet");
    wb.setSheetVisibility(0, SheetVisibility.HIDDEN);
    java.io.FileOutputStream fos = new java.io.FileOutputStream("/tmp/hidden"
            + "." + _testDataProvider.getStandardFileNameExtension());
    wb.write(fos);
    wb.close();
    fos.close();

    wb = _testDataProvider.createWorkbook();
    wb.createSheet("First Sheet");
    wb.setSheetVisibility(0, SheetVisibility.VERY_HIDDEN);
    fos = new java.io.FileOutputStream("/tmp/veryhidden"
            + "." + _testDataProvider.getStandardFileNameExtension());
    wb.write(fos);
    wb.close();
    fos.close();
}

Excel 2013 behavior:
hidden.xls and veryhidden.xls open without a warning with no sheets visible.
After adding a sheet to hidden.xls, the menu to unhide the first sheet is
available.
hidden.xlsx and veryhidden.xlsx open with a
> "We found a problem with some content in 'veryhidden.xlsx'. Do you want us to 
> try to recover as much as we can?"
corrupted workbook dialog.

LibreOffice 4.0.4.2 behavior:
all 4 files open with the first sheet visible.

If we implement this to match Excel's behavior, we would have an inconsistency
between HSSF and XSSF.

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