getProperties()->setLastModifiedBy("Maarten Balliauw");$ob">
时间:2021-07-01 10:21:17 帮助过:7人阅读
getProperties()->setCreator("Maarten Balliauw");$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw");$objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document");$objPHPExcel->getProperties()->setSubject("Office 2007 XLSX Test Document");$objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.");$objPHPExcel->getProperties()->setKeywords("office 2007 openxml php");$objPHPExcel->getProperties()->setCategory("Test result file");$objPHPExcel->setActiveSheetIndex(0);$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Hello1');$objPHPExcel->getActiveSheet()->setCellValue('B1', 'world2');$objPHPExcel->getActiveSheet()->setCellValue('C1', 'Hello3');$objPHPExcel->getActiveSheet()->setCellValue('D1', 'world4');$objPHPExcel->getActiveSheet()->setTitle('sheet01');$objPHPExcel->setActiveSheetIndex(0);$phpexcel = PHPExcel_IOFactory::load("phonelist.xls");$sheet = clone $phpexcel->getActiveSheet();$objPHPExcel->addExternalSheet($sheet);$objPHPExcel->removeSheetByIndex(0);$objPHPExcel->getActiveSheet()->removeRow(3);$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');$objWriter->save(str_replace('.php', '.xlsx', __FILE__));// __FILE__ => excel文件的绝对路径?>
为什么要用 form包住代码?
把放到php代码前面看看。
为什么要用 form包住代码?
把放到php代码前面看看。