You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by pelican <pe...@hotmail.com> on 2007/03/12 09:49:39 UTC
Can I set the active sheet of the workbook?
Hi,
I am creating Excel file using POI. My application includes generating the 12 sheets for the 12 months of the year. So far OK.
After creating all the relevant data, I wish to put the cursor to the current month. (eg. say sheet number 3 for March).
It means that when the user opens the Excel file, the sheet with the current month will be seen.
How can I do it?
thanks and rgds,
Re: Can I set the active sheet of the workbook?
Posted by Òscar Álvarez Vilaplana <gr...@gmail.com>.
There's a setSelectedTab method in HSSFWorkbook you can use.
Regards,
2007/3/12, pelican <pe...@hotmail.com>:
> Hi,
>
> I am creating Excel file using POI. My application includes generating the 12 sheets for the 12 months of the year. So far OK.
>
> After creating all the relevant data, I wish to put the cursor to the current month. (eg. say sheet number 3 for March).
> It means that when the user opens the Excel file, the sheet with the current month will be seen.
>
> How can I do it?
>
> thanks and rgds,
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: Can I set the active sheet of the workbook?
Posted by pelican <pe...@hotmail.com>.
Hi,
Thanks a lot to "Tahir Akhtar" and "Oscar Alvarez Vilaplana" for reply.
It was successfull.
rgds,
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
RE: Can I set the active sheet of the workbook?
Posted by Tahir Akhtar <ta...@spectrum-tech.com>.
For setting a sheet's selected status (Helpful, for example, when you want
the user to print only selected sheets):
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFShee
t.html#setSelected(boolean)
For setting the selected tab of workbook
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFWork
book.html#setSelectedTab(short)
Wassalam
Tahir
> -----Original Message-----
> From: pelican [mailto:pelican5699@hotmail.com]
> Sent: Monday, March 12, 2007 1:50 PM
> To: poi-user@jakarta.apache.org
> Subject: Can I set the active sheet of the workbook?
>
> Hi,
>
> I am creating Excel file using POI. My application includes generating the
> 12 sheets for the 12 months of the year. So far OK.
>
> After creating all the relevant data, I wish to put the cursor to the
> current month. (eg. say sheet number 3 for March).
> It means that when the user opens the Excel file, the sheet with the
> current month will be seen.
>
> How can I do it?
>
> thanks and rgds,
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/