Hi,
I am trying to set the orientation for printing the .xlsx file to
"Landscape". But the orientation becomes "Portrait". The test program I made
is like the following.
SXSSFWorkbook wb = new SXSSFWorkbook(100);
Sheet sh = wb.createSheet();
sh.setRepeatingRows(CellRangeAddress.valueOf("1:1"));
XSSFPrintSetup ps = (XSSFPrintSetup) sh.getPrintSetup();
*ps.setLandscape(true);*
try {
FileOutputStream out = new FileOutputStream("Test.xlsx");
wb.write(out);
out.close();
wb.dispose();
} catch (Exception e) {
System.out.print("Exception happens!!!");
}
However when I commented out the line of
"sh.setRepeatingRows(CellRangeAddress.valueOf("1:1"));", the orientation was
set to "Landscape".
I would like to make use of "RepeatingRows" feature. Please tell me how to
set the orientation to "Landscape" in conjunction with the "RepeatingRows"
feature.
Incidentally I use Apache POI 3.9.
Regards,
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Unable-to-set-Landscape-if-RepeatingRows-is-set-for-the-sheet-tp5714727.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]