I'm using setPrintArea() to limit the print area on a sheet, and that
much is working - I can read the print area back and it gives me the
right coordinates. But when I save the document, the print area
information disappears - when the document is opened using Excel the
entire sheet appears in page preview.

Here are the relevant bits of my code - I'm pretty certain it's not an
error on my part:

                wb.setPrintArea(0, 0, finalColNum, 0, finalRowNum);

                String retrievedPrintArea = wb.getPrintArea(0);
                if (retrievedPrintArea != null)
                        System.out.println("Print Area: " + 
retrievedPrintArea); // output is
"Print Area: 'All Invoices'!$A$1:$L$1089"
        ...
java.io.FileOutputStream out = new java.io.FileOutputStream(fileTmp);
                        wb.write(out);
                        out.flush();
                        out.close();


-- 
Ethan Baldridge <[email protected]>
Superior Document Services

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to