You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by mg...@gmail.com on 2008/04/17 06:33:03 UTC
Excel page setup fit to 1 page wide
Hello all,
I am trying to set the excel file to print in 1 page wide setting ( you can set this in file --> page setup in excel). In my code I get the print setup of the sheet and use set method in that class. However this doesn't seem to have any effect. I am able to turn on grid lines, set footer and page layouts successfully. Is there something that I am missing here?
Sent via BlackBerry by AT&T
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Excel page setup fit to 1 page wide
Posted by Yegor Kozlov <ye...@dinom.ru>.
HSSFPrintSetup prsetup = sheet.getPrintSetup();
prsetup.setFitHeight((short)1);
prsetup.setFitWidth((short)1);
sheet.setAutobreaks(true);
sheet.setFitToPage(true);
Yegor
> Hello all,
> I am trying to set the excel file to print in 1 page wide setting (
> you can set this in file --> page setup in excel). In my code I get
> the print setup of the sheet and use set method in that class.
> However this doesn't seem to have any effect. I am able to turn on
> grid lines, set footer and page layouts successfully. Is there something that I am missing here?
> Sent via BlackBerry by AT&T
> ---------------------------------------------------------------------
> 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