Try reading section 4.6.10 (Page Setup: Scaling options
) of the developer documentation:
$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(0);
$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToHeight(1);
Question
can anyone help me how to auto scale my phpexcel report in php according to the width of my report? And also i want my report to be auto landscape.
I want my report in phpexcel to autofit in a page according to the width of my report.
Solution
Try reading section 4.6.10 (Page Setup: Scaling options
) of the developer documentation:
$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(0);
$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToHeight(1);