https://issues.apache.org/bugzilla/show_bug.cgi?id=55378
Bug ID: 55378
Summary: Need to setup Print option "Fit All Columns on One
Page" in poi java code
Product: POI
Version: 3.7
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Hi all,
I know that following poi code will setup the print option "Fit Sheet on One
Page" by default
Workbook wb = new HSSFWorkbook();
Sheet sheet = wb.createSheet("format sheet");
PrintSetup ps = sheet.getPrintSetup();
sheet.setAutobreaks(true);
ps.setFitHeight((short)1);
ps.setFitWidth((short)1);
But my requirement is to setup Print Option "Fit All Columns on One Page" by
default. i.e. when the excel is generated and user presses Ctrl+P it should
show the Print dialog box with "Fit All Columns on One Page" option by default.
I tried with
ps.setFitHeight((short)2);
ps.setFitWidth((short)2);
but it doesn't work.
Can somebody please help asap, need help urgently.
Thanks,
Rajesh
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]