Answer the question
In order to leave comments, you need to log in
How can PhpSpreadsheet write to other sheets?
There is an excel template in it several sheets, you need to write as for example in phpexcel
First sheet
$aSheet = $objPHPExcel->setActiveSheetIndex(0);
second sheet
$aSheet1 = $objPHPExcel->setActiveSheetIndex(1);
etc.
In PhpSpreadsheet this syntax does not work(
Answer the question
In order to leave comments, you need to log in
Works
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$spreadsheet->setActiveSheetIndex(0);
$activeSheet = $spreadsheet->getActiveSheet();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question