https://issues.apache.org/bugzilla/show_bug.cgi?id=43693
Walter Higgins <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Severity|minor |normal --- Comment #6 from Walter Higgins <[email protected]> 2009-12-22 07:08:58 UTC --- The following code can be used to reproduce this problem. Create a standard blank workbook and save it as test.xls. Compile and run the following TestPOI.java source. Open the out.xls file in excel and choose 'File' -> 'Page Setup' from the application menu. The page orientation has not changed to Landscape. import java.io.*; import org.apache.poi.hssf.usermodel.*; import java.util.*; public class TestPOI { public static void main(String[] args) throws Exception{ HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream("test.xls")); int sheetCount = workbook.getNumberOfSheets(); for (int i = 0; i < sheetCount; i++){ System.out.println(i); HSSFSheet sheet = workbook.getSheetAt(i); HSSFPrintSetup print = sheet.getPrintSetup(); print.setLandscape(true); } workbook.write(new FileOutputStream("out.xls")); } } -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- 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]
