Hi Ted,
Shawn Laubach wrote about this a couple weeks ago, and I quote:
=======================================================
HSSFSheet sheet = book.createSheet("Sheet");
HSSFPrintSetup ps = sheet.getPrintSetup();
ps.setFitHeight((short)1);
ps.setFitWidth((short)1);
sheet.setAutobreaks(true); //Required to do the checkbutton
=======================================================
This stuff works, I tried it!
Paul
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
"Gordon, Ted"
<ted.gordon@medtr To: <[EMAIL PROTECTED]>
onic.com> cc:
Subject: HSSF: Setting fit to page
option doesn't seem to work
08/14/2002 03:53
PM
Please respond to
"POI Users List"
Hi all,
I'm creating an Excel file with HSSF. I'm trying to set the fit to page option using
using the following code:
HSSFSheet sheet = wb.createSheet("Performance Report");
// Set various print options to fit to page
sheet.getPrintSetup().setFitWidth((short)1);
sheet.getPrintSetup().setFitHeight((short)99);
sheet.setFitToPage(true);
I save the file and open it with Excel. Looking in the page setup dialog box, the fit
to page parameters are correctly set to 1 and 99, but the Fit to: radio button is not
chosen. I also tried reversing the order (calling setFitToPage first) with the same
results. Am I doing something wrong?
I'm using POI version 1.8 Dev, but it didn't work with version 1.5 either.
Thanks in advance.
Ted Gordon
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>