You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Yamaguchi, Yudai" <yu...@fronteo.com> on 2017/10/30 07:17:55 UTC

XSSFWorkbook isHidden implementation

Hello all,

I would like to use 'isHidden method' (This method returns false if the workbook is not visible in the GUI).
I can call it by using the HSSFWorkbook Class, but in the XSSFWorkbook Class, it hasn`t been implemeted yet.

Are there any plans to implement 'isHidden method' in the XSSFWorkbook Class?

Thanks in advance.

--------------------------------------------------------------------------------------------
株式会社FRONTEO
行動情報科学研究所
山口 裕大

108-0075
東京都港区港南2-12-23明産高浜ビル
TEL 03-5463-2070  FAX 03-5463-6345
yudai_yamaguchi@fronteo.com
www.fronteo.com


--------------------------------------------------------------------------------------------

この電子メール(添付ファイル等を含む)は、宛先として意図した特定の相手に
送信したものであり秘匿特権の対象になる情報を含んでいます。
もし、意図した相手以外の方が受信された場合はこのメールを破棄していただく
とともに、このメールについて、一切の開示、複写、配布、その他の利用または
記載内容に基づくいかなる行動もされないようにお願いします。

IMPORTANT NOTICE: 
This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law.
If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. 


RE: XSSFWorkbook isHidden implementation

Posted by "Murphy, Mark" <mu...@metalexmfg.com>.
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.

-----Original Message-----
From: Javen O'Neal [mailto:onealj@apache.org] 
Sent: Monday, October 30, 2017 10:46 PM
To: POI Users List <us...@poi.apache.org>
Subject: Re: XSSFWorkbook isHidden implementation

Yudai Yamaguchi-san,

How are you planning on using workbook visibility?

My understanding of workbook visibility, using Excel 2013 (no longer a multiple document interface) is that at least one workbook view must be visible (Excel disallows saving an all-hidden workbook), and each sheet defines a sheetviews list with one entry per workbook view.

There are quite a few gotchas to getting book views working in POI without creating xlsx files that Excel will declare are corrupt.

If your use case is a workbook that already contains multiple workbook views and you need to change the visibility of the first workbook view, then we can skip adding and removing workbook views to a workbook.
Otherwise, some research is needed to implement the dependent features before implementing boolean isHidden(int) and void setHidden(int, boolean), or possibly Enum WorbookViewVisibility { visible, hidden, very_hidden }.

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

RE: XSSFWorkbook isHidden implementation

Posted by "Murphy, Mark" <mu...@metalexmfg.com>.
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.

-----Original Message-----
From: Javen O'Neal [mailto:onealj@apache.org] 
Sent: Monday, October 30, 2017 10:46 PM
To: POI Users List <us...@poi.apache.org>
Subject: Re: XSSFWorkbook isHidden implementation

Yudai Yamaguchi-san,

How are you planning on using workbook visibility?

My understanding of workbook visibility, using Excel 2013 (no longer a multiple document interface) is that at least one workbook view must be visible (Excel disallows saving an all-hidden workbook), and each sheet defines a sheetviews list with one entry per workbook view.

There are quite a few gotchas to getting book views working in POI without creating xlsx files that Excel will declare are corrupt.

If your use case is a workbook that already contains multiple workbook views and you need to change the visibility of the first workbook view, then we can skip adding and removing workbook views to a workbook.
Otherwise, some research is needed to implement the dependent features before implementing boolean isHidden(int) and void setHidden(int, boolean), or possibly Enum WorbookViewVisibility { visible, hidden, very_hidden }.

Re: XSSFWorkbook isHidden implementation

Posted by Javen O'Neal <on...@apache.org>.
Yudai Yamaguchi-san,

How are you planning on using workbook visibility?

My understanding of workbook visibility, using Excel 2013 (no longer a
multiple document interface) is that at least one workbook view must be
visible (Excel disallows saving an all-hidden workbook), and each sheet
defines a sheetviews list with one entry per workbook view.

There are quite a few gotchas to getting book views working in POI without
creating xlsx files that Excel will declare are corrupt.

If your use case is a workbook that already contains multiple workbook
views and you need to change the visibility of the first workbook view,
then we can skip adding and removing workbook views to a workbook.
Otherwise, some research is needed to implement the dependent features
before implementing boolean isHidden(int) and void setHidden(int, boolean),
or possibly Enum WorbookViewVisibility { visible, hidden, very_hidden }.

Re: XSSFWorkbook isHidden implementation

Posted by Javen O'Neal <on...@apache.org>.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61699

On Oct 30, 2017 13:32, "Dominik Stadler" <do...@gmx.at> wrote:

> Hi,
>
> If you can provide two nearly identical .xlsx-files, one with the hidden
> workbook setting and one without, then I can help you identify the
> necessary properties in the XML inside the zipped .xlsx file which will
> tell us how we can actually implement the feature for XSSF.
>
> Dominik.
>
> On Mon, Oct 30, 2017 at 7:36 PM, Javen O'Neal <on...@apache.org> wrote:
>
> > Yudai Yamaguchi-san,
> >
> > If you submit a pull request (GitHub) or patch (bugzilla), we'd be happy
> to
> > review and commit your changes.
> >
> > Javen
> >
> > On Oct 30, 2017 11:24, "Dominik Stadler" <do...@gmx.at> wrote:
> >
> > For XSSF it actually throws an exception stating that it is not yet
> > implemented, not sure how hard it would be to fix that, hopefully not
> hard.
> >
> > Dominik
> >
> > On Oct 30, 2017 5:00 PM, "Javen O'Neal" <on...@apache.org> wrote:
> >
> > XSSFWorkbook#isHidden is available in the latest version of POI (3.17).
> > What version are you using?
> >
> > https://poi.apache.org/apidocs/org/apache/poi/xssf/
> > usermodel/XSSFWorkbook.html#isHidden--
> >
> > On Oct 30, 2017 00:18, "Yamaguchi, Yudai" <yu...@fronteo.com>
> > wrote:
> >
> > > Hello all,
> > >
> > > I would like to use 'isHidden method' (This method returns false if the
> > > workbook is not visible in the GUI).
> > > I can call it by using the HSSFWorkbook Class, but in the XSSFWorkbook
> > > Class, it hasn`t been implemeted yet.
> > >
> > > Are there any plans to implement 'isHidden method' in the XSSFWorkbook
> > > Class?
> > >
> > > Thanks in advance.
> > >
> > > ------------------------------------------------------------
> > > --------------------------------
> > > 株式会社FRONTEO
> > > 行動情報科学研究所
> > > 山口 裕大
> > >
> > > 108-0075
> > > 東京都港区港南2-12-23明産高浜ビル
> > > TEL 03-5463-2070  FAX 03-5463-6345
> > > yudai_yamaguchi@fronteo.com
> > > www.fronteo.com
> > >
> > >
> > > ------------------------------------------------------------
> > > --------------------------------
> > >
> > > この電子メール(添付ファイル等を含む)は、宛先として意図した特定の相手に
> > > 送信したものであり秘匿特権の対象になる情報を含んでいます。
> > > もし、意図した相手以外の方が受信された場合はこのメールを破棄していただく
> > > とともに、このメールについて、一切の開示、複写、配布、その他の利用または
> > > 記載内容に基づくいかなる行動もされないようにお願いします。
> > >
> > > IMPORTANT NOTICE:
> > > This transmission may contain information that is privileged,
> > > confidential, legally privileged, and/or exempt from disclosure under
> > > applicable law.
> > > If you are not the intended recipient, you are hereby notified that any
> > > disclosure, copying, distribution, or use of the information contained
> > > herein (including any reliance thereon) is STRICTLY PROHIBITED.
> > >
> > >
> >
>

Re: XSSFWorkbook isHidden implementation

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

If you can provide two nearly identical .xlsx-files, one with the hidden
workbook setting and one without, then I can help you identify the
necessary properties in the XML inside the zipped .xlsx file which will
tell us how we can actually implement the feature for XSSF.

Dominik.

On Mon, Oct 30, 2017 at 7:36 PM, Javen O'Neal <on...@apache.org> wrote:

> Yudai Yamaguchi-san,
>
> If you submit a pull request (GitHub) or patch (bugzilla), we'd be happy to
> review and commit your changes.
>
> Javen
>
> On Oct 30, 2017 11:24, "Dominik Stadler" <do...@gmx.at> wrote:
>
> For XSSF it actually throws an exception stating that it is not yet
> implemented, not sure how hard it would be to fix that, hopefully not hard.
>
> Dominik
>
> On Oct 30, 2017 5:00 PM, "Javen O'Neal" <on...@apache.org> wrote:
>
> XSSFWorkbook#isHidden is available in the latest version of POI (3.17).
> What version are you using?
>
> https://poi.apache.org/apidocs/org/apache/poi/xssf/
> usermodel/XSSFWorkbook.html#isHidden--
>
> On Oct 30, 2017 00:18, "Yamaguchi, Yudai" <yu...@fronteo.com>
> wrote:
>
> > Hello all,
> >
> > I would like to use 'isHidden method' (This method returns false if the
> > workbook is not visible in the GUI).
> > I can call it by using the HSSFWorkbook Class, but in the XSSFWorkbook
> > Class, it hasn`t been implemeted yet.
> >
> > Are there any plans to implement 'isHidden method' in the XSSFWorkbook
> > Class?
> >
> > Thanks in advance.
> >
> > ------------------------------------------------------------
> > --------------------------------
> > 株式会社FRONTEO
> > 行動情報科学研究所
> > 山口 裕大
> >
> > 108-0075
> > 東京都港区港南2-12-23明産高浜ビル
> > TEL 03-5463-2070  FAX 03-5463-6345
> > yudai_yamaguchi@fronteo.com
> > www.fronteo.com
> >
> >
> > ------------------------------------------------------------
> > --------------------------------
> >
> > この電子メール(添付ファイル等を含む)は、宛先として意図した特定の相手に
> > 送信したものであり秘匿特権の対象になる情報を含んでいます。
> > もし、意図した相手以外の方が受信された場合はこのメールを破棄していただく
> > とともに、このメールについて、一切の開示、複写、配布、その他の利用または
> > 記載内容に基づくいかなる行動もされないようにお願いします。
> >
> > IMPORTANT NOTICE:
> > This transmission may contain information that is privileged,
> > confidential, legally privileged, and/or exempt from disclosure under
> > applicable law.
> > If you are not the intended recipient, you are hereby notified that any
> > disclosure, copying, distribution, or use of the information contained
> > herein (including any reliance thereon) is STRICTLY PROHIBITED.
> >
> >
>

Re: XSSFWorkbook isHidden implementation

Posted by Javen O'Neal <on...@apache.org>.
Yudai Yamaguchi-san,

If you submit a pull request (GitHub) or patch (bugzilla), we'd be happy to
review and commit your changes.

Javen

On Oct 30, 2017 11:24, "Dominik Stadler" <do...@gmx.at> wrote:

For XSSF it actually throws an exception stating that it is not yet
implemented, not sure how hard it would be to fix that, hopefully not hard.

Dominik

On Oct 30, 2017 5:00 PM, "Javen O'Neal" <on...@apache.org> wrote:

XSSFWorkbook#isHidden is available in the latest version of POI (3.17).
What version are you using?

https://poi.apache.org/apidocs/org/apache/poi/xssf/
usermodel/XSSFWorkbook.html#isHidden--

On Oct 30, 2017 00:18, "Yamaguchi, Yudai" <yu...@fronteo.com>
wrote:

> Hello all,
>
> I would like to use 'isHidden method' (This method returns false if the
> workbook is not visible in the GUI).
> I can call it by using the HSSFWorkbook Class, but in the XSSFWorkbook
> Class, it hasn`t been implemeted yet.
>
> Are there any plans to implement 'isHidden method' in the XSSFWorkbook
> Class?
>
> Thanks in advance.
>
> ------------------------------------------------------------
> --------------------------------
> 株式会社FRONTEO
> 行動情報科学研究所
> 山口 裕大
>
> 108-0075
> 東京都港区港南2-12-23明産高浜ビル
> TEL 03-5463-2070  FAX 03-5463-6345
> yudai_yamaguchi@fronteo.com
> www.fronteo.com
>
>
> ------------------------------------------------------------
> --------------------------------
>
> この電子メール(添付ファイル等を含む)は、宛先として意図した特定の相手に
> 送信したものであり秘匿特権の対象になる情報を含んでいます。
> もし、意図した相手以外の方が受信された場合はこのメールを破棄していただく
> とともに、このメールについて、一切の開示、複写、配布、その他の利用または
> 記載内容に基づくいかなる行動もされないようにお願いします。
>
> IMPORTANT NOTICE:
> This transmission may contain information that is privileged,
> confidential, legally privileged, and/or exempt from disclosure under
> applicable law.
> If you are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or use of the information contained
> herein (including any reliance thereon) is STRICTLY PROHIBITED.
>
>

Re: XSSFWorkbook isHidden implementation

Posted by Dominik Stadler <do...@gmx.at>.
For XSSF it actually throws an exception stating that it is not yet
implemented, not sure how hard it would be to fix that, hopefully not hard.

Dominik

On Oct 30, 2017 5:00 PM, "Javen O'Neal" <on...@apache.org> wrote:

XSSFWorkbook#isHidden is available in the latest version of POI (3.17).
What version are you using?

https://poi.apache.org/apidocs/org/apache/poi/xssf/
usermodel/XSSFWorkbook.html#isHidden--

On Oct 30, 2017 00:18, "Yamaguchi, Yudai" <yu...@fronteo.com>
wrote:

> Hello all,
>
> I would like to use 'isHidden method' (This method returns false if the
> workbook is not visible in the GUI).
> I can call it by using the HSSFWorkbook Class, but in the XSSFWorkbook
> Class, it hasn`t been implemeted yet.
>
> Are there any plans to implement 'isHidden method' in the XSSFWorkbook
> Class?
>
> Thanks in advance.
>
> ------------------------------------------------------------
> --------------------------------
> 株式会社FRONTEO
> 行動情報科学研究所
> 山口 裕大
>
> 108-0075
> 東京都港区港南2-12-23明産高浜ビル
> TEL 03-5463-2070  FAX 03-5463-6345
> yudai_yamaguchi@fronteo.com
> www.fronteo.com
>
>
> ------------------------------------------------------------
> --------------------------------
>
> この電子メール(添付ファイル等を含む)は、宛先として意図した特定の相手に
> 送信したものであり秘匿特権の対象になる情報を含んでいます。
> もし、意図した相手以外の方が受信された場合はこのメールを破棄していただく
> とともに、このメールについて、一切の開示、複写、配布、その他の利用または
> 記載内容に基づくいかなる行動もされないようにお願いします。
>
> IMPORTANT NOTICE:
> This transmission may contain information that is privileged,
> confidential, legally privileged, and/or exempt from disclosure under
> applicable law.
> If you are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or use of the information contained
> herein (including any reliance thereon) is STRICTLY PROHIBITED.
>
>

Re: XSSFWorkbook isHidden implementation

Posted by Javen O'Neal <on...@apache.org>.
XSSFWorkbook#isHidden is available in the latest version of POI (3.17).
What version are you using?

https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFWorkbook.html#isHidden--

On Oct 30, 2017 00:18, "Yamaguchi, Yudai" <yu...@fronteo.com>
wrote:

> Hello all,
>
> I would like to use 'isHidden method' (This method returns false if the
> workbook is not visible in the GUI).
> I can call it by using the HSSFWorkbook Class, but in the XSSFWorkbook
> Class, it hasn`t been implemeted yet.
>
> Are there any plans to implement 'isHidden method' in the XSSFWorkbook
> Class?
>
> Thanks in advance.
>
> ------------------------------------------------------------
> --------------------------------
> 株式会社FRONTEO
> 行動情報科学研究所
> 山口 裕大
>
> 108-0075
> 東京都港区港南2-12-23明産高浜ビル
> TEL 03-5463-2070  FAX 03-5463-6345
> yudai_yamaguchi@fronteo.com
> www.fronteo.com
>
>
> ------------------------------------------------------------
> --------------------------------
>
> この電子メール(添付ファイル等を含む)は、宛先として意図した特定の相手に
> 送信したものであり秘匿特権の対象になる情報を含んでいます。
> もし、意図した相手以外の方が受信された場合はこのメールを破棄していただく
> とともに、このメールについて、一切の開示、複写、配布、その他の利用または
> 記載内容に基づくいかなる行動もされないようにお願いします。
>
> IMPORTANT NOTICE:
> This transmission may contain information that is privileged,
> confidential, legally privileged, and/or exempt from disclosure under
> applicable law.
> If you are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or use of the information contained
> herein (including any reliance thereon) is STRICTLY PROHIBITED.
>
>