Excel5: setPrintArea

Topics: Developer Forum
Mar 17, 2008 at 8:17 PM
Does Excel5 Writer support setPrintArea? Trying to set it with:

$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcelWorksheetPageSetup::ORIENTATION_LANDSCAPE);
$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcelWorksheetPageSetup::PAPERSIZE_A4);
$objPHPExcel->getActiveSheet()->getPageSetup()->setPrintArea('A1:D5');

But looks like it doesn't work. At least when I open the file with Excel2000.

According to documentation, PHPExcelWriterExcel5 "is basically a modified version of PEAR SpreadsheetExcelWriter, and has the same limitations and features as the PEAR library". According to PEAR Manual, SpreadsheetExcelWriter has Worksheet::printArea method implemented.

Does it mean that PHPExcelWriterExcel5 should support setting printing area?

setScale, setFitToHeight and setFitToWidth do not seem to work too.
Mar 18, 2008 at 7:24 AM
Sorry, I haven't read this before posting:
http://www.codeplex.com/PHPExcel/Thread/View.aspx?ThreadId=24209