0

我在excel模板中定义了一些标签,但是我不知道如何使用PHPexcel来替换模板中的那些标签?

require_once './Classes/PHPExcel.php';

$filepath = './tpl.xlsx'; 
$objPHPExcel = PHPExcel_IOFactory::load($filepath);  
$sheetData = $objPHPExcel->getActiveSheet(0)->toArray();      


$PHPExcel = new PHPExcel(); 


$objWriter = PHPExcel_IOFactory::createWriter($sheetData, 'Excel5'); 


$filename = time().'.xlsx';
$objWriter->save('./'.$filename);
4

0 回答 0