monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
943 stars 342 forks source link

XSSFWorkbook change orientation to landscape #267

Closed wider2 closed 6 months ago

wider2 commented 6 months ago

Sorry for disturb. Just need fresh opinion. I have tried different variants to achieve change orientation to Portrait or Landscape inside java appl

I damned everything I know with this, but still no luck. Maybe somebody know how to overtrick the library?

this does not take effect:

            XSSFPrintSetup printSetup = worksheet.getPrintSetup();
            if (orientation.equals("landscape")) {
                printSetup.setLandscape(true);
                printSetup.setPaperSize(PrintSetup.A4_PAPERSIZE);

                worksheet.setFitToPage(true);
                worksheet.setHorizontallyCenter(true);
                worksheet.getPrintSetup().setLandscape(true);
                worksheet.getPrintSetup().setPaperSize((short)11);