I\'m using Apache POI to create xls spreadsheets. Is there a way to detect if the data fits in portrait mode or if I have to set the sheet to landscape mode? I know how to set t
HSSFPrintSetup printSetup = sheet.getPrintSetup();
sheet.getPrintSetup().setFitWidth((short) 1);
sheet.getPrintSetup().setFitHeight((short) 0);
sheet.setAutobreaks(true);
printSetup .setLandscape(true);
HSSFFooter footer = wygSheet.getFooter();
footer.setCenter("Page " + HSSFFooter.page() + " of "+ HSSFFooter.numPages());