phpExcel 设置打印区域

$PHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);$PHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);$PHPExcel->getActiveSheet()->setBreak('A'.($key1+2),PHPExcel_Worksheet::BREAK_NONE);$PHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(1);//设置自动填充宽度$PHPExcel->getActiveSheet()->getPageSetup()->setFitToHeight(1);//设置自动填充高度

你可能感兴趣的:(phpExcel 设置打印区域)