My application generates a excel file with many rows. I want to set it fit to page width. Here is my code:
workbook.setRepeatingRowsAndColumns(SomeRow, SomeCol); // Make header repeat on each printout page. HSSFPrintSetup ps = hsf.sheet.getPrintSetup(); ps.setLandscape(true); sheet.setAutoBreaks(true); ps.setFitWidth((short)1); After the file is generated, I go to print preview in Excel. The preview is in landscape, but the sheet is scaled to fit only the left half of the page. The text is very small. What is the correct way to do this? Thanks. Zihao
