如何在PHPExcel中添加多个工作表

时间:2015-02-02 16:21:32

标签: php phpexcel

如何使用phpexcel类添加多个工作表。

$this->excel = new PHPExcel();

1 个答案:

答案 0 :(得分:2)

查看PHPExcel documentation

// Create a new worksheet called "My Data"
$myWorkSheet = new PHPExcel_Worksheet($objPHPExcel, 'My Data');

// Attach the "My Data" worksheet as the first worksheet in the PHPExcel object
$objPHPExcel->addSheet($myWorkSheet, 0);