[Bug 61699] New: Implement XSSFWorkbook#isHidden()

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61699] New: Implement XSSFWorkbook#isHidden()

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61699

            Bug ID: 61699
           Summary: Implement XSSFWorkbook#isHidden()
           Product: POI
           Version: 4.0-dev
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: XSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 35476
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35476&action=edit
Empty workbook with a hidden workbook view

From Users@POI mailing list:
https://lists.apache.org/thread.html/4c6b6800d165d90374d3ad3ea49bbd1509c3a4d0dc093d0f1d597965@%3Cuser.poi.apache.org%3E

I was able to create a hidden window in Microsoft Excel 2013 only when there
were multiple views of a workbook open.
View > Window > New Window to create a 2nd view of the active workbook
View > Window > Hide to hide the active view of the active workbook

In the XML:
xl/workbook.xml:
 <workbook xmlns="..." ...>
     ...
     <bookViews>
         <workbookView xWindow="0" yWindow="0" windowWidth="16920"
windowHeight="10980"/>
+        <workbookView visibility="hidden" xWindow="0" yWindow="0"
windowWidth="16920" windowHeight="10980"/>
     </bookViews>
     ...
 </workbook>

xl/worksheets/sheet1.xml:
 <worksheet xmlns="..." ...>
     ...
     <sheetViews>
         <sheetView tabSelected="1" workbookViewId="0"/>
+        <sheetView tabSelected="1" workbookViewId="1"/>
     </sheetViews>
     ...
 </worksheet>

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61699] Implement XSSFWorkbook#isHidden()

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61699

--- Comment #1 from Javen O'Neal <[hidden email]> ---
HSSFWorkbook implemented isHidden/setHidden as the visibility of the first
workbook view (InternalWorkbook.getWindowOne().getHidden()).

The correct behavior would seem to let the user specify the index of the window
(view) and return the visibility of that window (view).

POI currently doesn't have functions for creating workbook views.

Being that Microsoft Excel doesn't allow you to hide every window view of a
workbook, it's likely you'll end up with a corrupt workbook if you hide the
only view on a workbook.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61699] Implement XSSFWorkbook#isHidden()

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61699

--- Comment #2 from Javen O'Neal <[hidden email]> ---
Created attachment 35477
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35477&action=edit
Patch to add isHidden(), setHidden(boolean), isHidden(int), setHidden(int,
boolean)

Being able to set workbook window views as hidden isn't very useful without
being able to create and delete workbook views.

This gets more complicated because of bookviews and sheetviews

> CTWorkbook.getBookViews().addNewWorkbookView();
> CTWorkbook.getBookViews().removeWorkbookView(int i);

http://www.datypic.com/sc/ooxml/e-ssml_workbookView-1.html
http://www.datypic.com/sc/ooxml/e-ssml_customWorkbookView-1.html
http://www.datypic.com/sc/ooxml/a-visibility-1.html

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61699] Implement XSSFWorkbook#isHidden()

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61699

--- Comment #3 from Dominik Stadler <[hidden email]> ---
Comments from Mark:

In my testing, Excel 2016, I can hide a workbook by selecting View->Hide. I can
do that even if it is the only workbook open. The XML is in workbook.xml and
looks like this:

<bookViews>
   <workbookView windowHeight="9600" windowWidth="17595" yWindow="255"
xWindow="225" visibility="hidden"/>
</bookViews>

I can close out of Excel with the only workbook hidden, and it allows me to
save it as hidden. When I re-open that workbook, it starts out hidden.
---------------------------------------------------------------------
For sheets, once again Excel 2016, I cannot hide the last visible sheet. So it
appears that Excel handles Sheets and workbooks differently. One potential
reason to have hidden workbooks is if you have a workbook with just macros in
it, and you have that in your XLSTART library [User
library]/AppData/Roaming/Microsoft/Excel/XLSTART, then that workbook will open
every time you open Excel, and you really want that workbook to be hidden, but
open with no visible window views.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]