poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ethan Baldridge" <et...@superiordocumentservices.com>
Subject bug in ss.usermodel.workbook.write()
Date Wed, 21 Jan 2009 21:09:17 GMT
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);

Ethan Baldridge <ethan@superiordocumentservices.com>
Superior Document Services

View raw message