$excel2 = PHPExcel_IOFactory::createReader('Excel2007'); $excel2 = $excel2->load('ExampleSpreadsheettest.xlsx'); $excel2->setActiveSheetIndex(0); $excel2->getActiveSheet()->setCellValue('A4', 'first page') ->setCellValue('A1', '5') ->setCellValue('A2', '6') ->setCellValue('A3', '7'); $objWriter = PHPExcel_IOFactory::createWriter($excel2, 'Excel2007'); $objWriter->save('ExampleNew.xlsx');
It works on the code, but I want to add more worksheets instead of a separate work page.
source share