Reputation: 1
Is there a way to write to a specific sheet in an excel multi-sheet file using PhpSpreadsheet without the sheets in said excel file being wiped out?
The write function in phpSpreadsheet always creates a new file thus wiping out my original file. Is this normal?
Below snippet always creates a new file:
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, "Xlsx");
$writer->save("mymultisheet-spreadsheet.xlsx");
Upvotes: 0
Views: 46