You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Rinck Jochen <jo...@boerner-online.de> on 2010/02/12 08:34:24 UTC

Landscape format and Upright format

Hello,

 

how can I set the format of a sheet in a workbook to landscape format or
to upright format?

 

Thanks,

Jochen Rinck

 

 


Re: AW: AW: Landscape format and Upright format

Posted by MSB <ma...@tiscali.co.uk>.
That's good news on a miserable, cold, wet day.

Any other questions you may have, just send a message to the list and
someone will try to hekp.

Yours

Mark B


Rinck Jochen wrote:
> 
> Hi Mark!
> 
> It works fine!
> 
> Thank you!
> Jochen
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: MSB [mailto:markbrdsly@tiscali.co.uk] 
> Gesendet: Montag, 15. Februar 2010 08:34
> An: user@poi.apache.org
> Betreff: Re: AW: Landscape format and Upright format
> 
> 
> Ah good, you should stil be able to get the print setup object from the
> sheet
> and set the page orientation on that with XWPF; must admit that I have not
> done this with XWPF yet but remain confident that it will work
> successfully.
> 
> Yours
> 
> Mark B
> 
> 
> Rinck Jochen wrote:
>> 
>> Hi Mark!
>> 
>> I am using the XSSF-API to Create Excel2007-Workbooks.
>> 
>> Jochen
>>  
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: MSB [mailto:markbrdsly@tiscali.co.uk] 
>> Gesendet: Freitag, 12. Februar 2010 17:09
>> An: user@poi.apache.org
>> Betreff: Re: Landscape format and Upright format
>> 
>> 
>> Can I ask please which API you are using; HWPF, XWPF, HSSF or XSSF? That
>> way,
>> we will know which methods to reccommed you use.
>> 
>> Just in case you are trying to create a binary Excel workbook using HSSF,
>> try to call the getPrintSetup() method from an instance of the HSSFSheet
>> class and then call the setLandscape(boolean) method defined on that
>> HSSFPrintSetup object the former method will return. Pass true to that
>> method to set the pages' orientation to landscape or false to set it to
>> portrait.
>> 
>> Yours
>> 
>> Mark B
>> 
>> PS The same methods are defined on the XSSFSheet class so you can do
>> something similar there also.
>> 
>> 
>> Rinck Jochen wrote:
>>> 
>>> Hello,
>>> 
>>>  
>>> 
>>> how can I set the format of a sheet in a workbook to landscape format or
>>> to upright format?
>>> 
>>>  
>>> 
>>> Thanks,
>>> 
>>> Jochen Rinck
>>> 
>>>  
>>> 
>>>  
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27565763.html
>> Sent from the POI - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27590342.html
> Sent from the POI - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27593129.html
Sent from the POI - User mailing list archive at Nabble.com.


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


AW: AW: Landscape format and Upright format

Posted by Rinck Jochen <jo...@boerner-online.de>.
Hi Mark!

It works fine!

Thank you!
Jochen


-----Ursprüngliche Nachricht-----
Von: MSB [mailto:markbrdsly@tiscali.co.uk] 
Gesendet: Montag, 15. Februar 2010 08:34
An: user@poi.apache.org
Betreff: Re: AW: Landscape format and Upright format


Ah good, you should stil be able to get the print setup object from the sheet
and set the page orientation on that with XWPF; must admit that I have not
done this with XWPF yet but remain confident that it will work successfully.

Yours

Mark B


Rinck Jochen wrote:
> 
> Hi Mark!
> 
> I am using the XSSF-API to Create Excel2007-Workbooks.
> 
> Jochen
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: MSB [mailto:markbrdsly@tiscali.co.uk] 
> Gesendet: Freitag, 12. Februar 2010 17:09
> An: user@poi.apache.org
> Betreff: Re: Landscape format and Upright format
> 
> 
> Can I ask please which API you are using; HWPF, XWPF, HSSF or XSSF? That
> way,
> we will know which methods to reccommed you use.
> 
> Just in case you are trying to create a binary Excel workbook using HSSF,
> try to call the getPrintSetup() method from an instance of the HSSFSheet
> class and then call the setLandscape(boolean) method defined on that
> HSSFPrintSetup object the former method will return. Pass true to that
> method to set the pages' orientation to landscape or false to set it to
> portrait.
> 
> Yours
> 
> Mark B
> 
> PS The same methods are defined on the XSSFSheet class so you can do
> something similar there also.
> 
> 
> Rinck Jochen wrote:
>> 
>> Hello,
>> 
>>  
>> 
>> how can I set the format of a sheet in a workbook to landscape format or
>> to upright format?
>> 
>>  
>> 
>> Thanks,
>> 
>> Jochen Rinck
>> 
>>  
>> 
>>  
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27565763.html
> Sent from the POI - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27590342.html
Sent from the POI - User mailing list archive at Nabble.com.


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


Re: AW: Landscape format and Upright format

Posted by MSB <ma...@tiscali.co.uk>.
Ah good, you should stil be able to get the print setup object from the sheet
and set the page orientation on that with XWPF; must admit that I have not
done this with XWPF yet but remain confident that it will work successfully.

Yours

Mark B


Rinck Jochen wrote:
> 
> Hi Mark!
> 
> I am using the XSSF-API to Create Excel2007-Workbooks.
> 
> Jochen
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: MSB [mailto:markbrdsly@tiscali.co.uk] 
> Gesendet: Freitag, 12. Februar 2010 17:09
> An: user@poi.apache.org
> Betreff: Re: Landscape format and Upright format
> 
> 
> Can I ask please which API you are using; HWPF, XWPF, HSSF or XSSF? That
> way,
> we will know which methods to reccommed you use.
> 
> Just in case you are trying to create a binary Excel workbook using HSSF,
> try to call the getPrintSetup() method from an instance of the HSSFSheet
> class and then call the setLandscape(boolean) method defined on that
> HSSFPrintSetup object the former method will return. Pass true to that
> method to set the pages' orientation to landscape or false to set it to
> portrait.
> 
> Yours
> 
> Mark B
> 
> PS The same methods are defined on the XSSFSheet class so you can do
> something similar there also.
> 
> 
> Rinck Jochen wrote:
>> 
>> Hello,
>> 
>>  
>> 
>> how can I set the format of a sheet in a workbook to landscape format or
>> to upright format?
>> 
>>  
>> 
>> Thanks,
>> 
>> Jochen Rinck
>> 
>>  
>> 
>>  
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27565763.html
> Sent from the POI - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27590342.html
Sent from the POI - User mailing list archive at Nabble.com.


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


AW: Landscape format and Upright format

Posted by Rinck Jochen <jo...@boerner-online.de>.
Hi Mark!

I am using the XSSF-API to Create Excel2007-Workbooks.

Jochen
 

-----Ursprüngliche Nachricht-----
Von: MSB [mailto:markbrdsly@tiscali.co.uk] 
Gesendet: Freitag, 12. Februar 2010 17:09
An: user@poi.apache.org
Betreff: Re: Landscape format and Upright format


Can I ask please which API you are using; HWPF, XWPF, HSSF or XSSF? That way,
we will know which methods to reccommed you use.

Just in case you are trying to create a binary Excel workbook using HSSF,
try to call the getPrintSetup() method from an instance of the HSSFSheet
class and then call the setLandscape(boolean) method defined on that
HSSFPrintSetup object the former method will return. Pass true to that
method to set the pages' orientation to landscape or false to set it to
portrait.

Yours

Mark B

PS The same methods are defined on the XSSFSheet class so you can do
something similar there also.


Rinck Jochen wrote:
> 
> Hello,
> 
>  
> 
> how can I set the format of a sheet in a workbook to landscape format or
> to upright format?
> 
>  
> 
> Thanks,
> 
> Jochen Rinck
> 
>  
> 
>  
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27565763.html
Sent from the POI - User mailing list archive at Nabble.com.


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


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


Re: Landscape format and Upright format

Posted by MSB <ma...@tiscali.co.uk>.
Can I ask please which API you are using; HWPF, XWPF, HSSF or XSSF? That way,
we will know which methods to reccommed you use.

Just in case you are trying to create a binary Excel workbook using HSSF,
try to call the getPrintSetup() method from an instance of the HSSFSheet
class and then call the setLandscape(boolean) method defined on that
HSSFPrintSetup object the former method will return. Pass true to that
method to set the pages' orientation to landscape or false to set it to
portrait.

Yours

Mark B

PS The same methods are defined on the XSSFSheet class so you can do
something similar there also.


Rinck Jochen wrote:
> 
> Hello,
> 
>  
> 
> how can I set the format of a sheet in a workbook to landscape format or
> to upright format?
> 
>  
> 
> Thanks,
> 
> Jochen Rinck
> 
>  
> 
>  
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Landscape-format-and-Upright-format-tp27559791p27565763.html
Sent from the POI - User mailing list archive at Nabble.com.


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