XSSFWorkbook isHidden implementation

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

XSSFWorkbook isHidden implementation

Yamaguchi, Yudai
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
[hidden email]
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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: XSSFWorkbook isHidden implementation

Javen O'Neal-2
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" <[hidden email]>
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
> [hidden email]
> 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.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: XSSFWorkbook isHidden implementation

Dominik Stadler
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" <[hidden email]> 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" <[hidden email]>
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
> [hidden email]
> 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.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: XSSFWorkbook isHidden implementation

Javen O'Neal-2
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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]>
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
> [hidden email]
> 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.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: XSSFWorkbook isHidden implementation

Dominik Stadler
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 <[hidden email]> 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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]>
> 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
> > [hidden email]
> > 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.
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: XSSFWorkbook isHidden implementation

Javen O'Neal-2
https://bz.apache.org/bugzilla/show_bug.cgi?id=61699

On Oct 30, 2017 13:32, "Dominik Stadler" <[hidden email]> 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 <[hidden email]> 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" <[hidden email]> 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" <[hidden email]> 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" <[hidden email]>
> > 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
> > > [hidden email]
> > > 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.
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: XSSFWorkbook isHidden implementation

Javen O'Neal-2
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 }.
Reply | Threaded
Open this post in threaded view
|

RE: XSSFWorkbook isHidden implementation

Murphy, 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.

-----Original Message-----
From: Javen O'Neal [mailto:[hidden email]]
Sent: Monday, October 30, 2017 10:46 PM
To: POI Users List <[hidden email]>
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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: XSSFWorkbook isHidden implementation

Murphy, Mark
In reply to this post by Javen O'Neal-2
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:[hidden email]]
Sent: Monday, October 30, 2017 10:46 PM
To: POI Users List <[hidden email]>
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: [hidden email]
For additional commands, e-mail: [hidden email]