问题
I want to set pagesetup in excel using phpspreadsheet. I found to do it using phpexcel from here. I do not know what to replace at PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT.
$sheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);
Thanks in advance.
回答1:
I found the answer. I tried it after go through PageSetup.php in PHPSpreadsheet.
$sheet->getPageSetup()->setOrientation(PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::ORIENTATION_PORTRAIT);
来源:https://stackoverflow.com/questions/54939915/how-to-set-page-orientationlandscape-or-portrait-in-phpspreadsheet