ページの印刷方向を横に設定。
<?php require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $worksheet =& $workbook->addWorksheet(); // ページの印刷方向を横に設定 $worksheet->setLandscape(); $worksheet->writeString(0, 0, "abc"); $worksheet->writeString(1, 0, "123"); $workbook->send('setLandscape.xls'); $workbook->close();
setLandscape で印刷方向を変更。