I am trying to create a workbook with 10 sheets. Before writing the
workbook, I run the following method on each sheet:
static void printFormat(HSSFSheet sht)
{
//format sheet
HSSFPrintSetup pSetup = sht.getPrintSetup();
sht.setAutobreaks(true);
pSetup.setFitWidth((short)1);
pSetup.setFitHeight((short)0);
pSetup.setLandscape(true);
}
When I open the workbook in Excel and look at Page Setup, all sheets have
the correct Fit to Page settings, but only the first page has the "Fit to:"
radio button selected. All other pages are still set to "Adjust to:".
Therefore only my first page is printing correctly.
When I use BiffViewer all of the pages have the same values in the [WSBOOL]
and [PRINTSETUP] sections, which are included below.
(All of the pages are correctly formatted for landscape.)
What am I doing wrong? Thanks in advance for any help.
Brian Glick
Freightek, Inc.
(215) 887-6100
[EMAIL PROTECTED]
[WSBOOL]
.wsbool1 = 5
.autobreaks = true
.dialog = false
.rowsumsbelw= false
.rowsumsrigt= false
.wsbool2 = ffffffc1
.fittopage = true
.displayguts= false
.alternateex= true
.alternatefo= true
[/WSBOOL]
[PRINTSETUP]
.papersize = 1
.scale = 100
.pagestart = 1
.fitwidth = 1
.fitheight = 0
.options = 0
.ltor = false
.landscape = false
.valid = false
.mono = false
.draft = false
.notes = false
.noOrientat = false
.usepage = false
.hresolution = 300
.vresolution = 300
.headermargin = 0.5
.footermargin = 0.5
.copies = 0
[/PRINTSETUP]
--
To unsubscribe, e-mail: <mailto:poi-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:poi-user-help@;jakarta.apache.org>