I´m working with phpspreadsheet and I want to modify an xlsx file with 4 sheets. I only want to insert data in 2 sheets, but I want to copy all 4 sheets to the new xlsx file. Wh
Finally I have found the solution. The problem was on the writer and the formulas, so have add this line to the code and now it works well:
$writer->setPreCalculateFormulas(false);
So the all the code for the writer now is:
$writer = new Xlsx($spreadsheet);
$writer->setPreCalculateFormulas(false);
$writer->save('test.xlsx');