In the future, please direct questions to the mailing list. The answer is in http://jakarta.apache.org/poi/hssf/quick-guide.html#FitTo
The key is autobreaks must also be set. Shawn -----Original Message----- From: madhan prabahar [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 01, 2005 10:56 AM To: [EMAIL PROTECTED] Subject: Help required in POI PrintSetup Hi, I'm using POI in my application to generate xls files. It is an amazing api which reduces lots of manual work in creating xls files. I need a clarification in HSSFPrintSetup class. If you see the Page section under the Page Setup of the xls file manually you can see two options under the Scaling title as: 1) Adjust to 2) Fit to How can I select the Adjust to option button using POI? I tried the following way but it didn't work. HSSFPrintSetup printSetUp = sheet.getPrintSetup(); printSetUp.setLandscape(true); printSetUp.setPaperSize(HSSFPrintSetup.LEGAL_PAPERSIZE); printSetUp.setScale((short)44); When I open the xls file created by this program I can see the value 44% in the AdjustTo option. But the option button is not selected. Instead, the Fit to page button only is selected. Hence while printing the fit to option takes precedence over the Adjust to option. I've two more doubts. -How to set AutoFilter using POI? -How to calculate subtotals using POI? Your advice on this would be a great help for me. Thanks a lot. Regards Madhan __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
