I have a php code that is triggered whenever a user clicks a determined button. That code basically creates a new directory and a new Excel File inside that same dir. My goal is to write into that excel file. I have the following code (which is not working, btw):
$filename = 'moldes/VLMOLDES_'.$id.'/Orcamento161.xlsm';
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filename);
$worksheet = $spreadsheet->getActiveSheet();
$worksheet->getCell('A18')->setValue('3');
Everything but writing in the file is working as expected. When I click the button, it opens a blank page but nothing happens! I've tried a lot of different ways but I'm a noob in phpSpreadSheets. How can I write in a specific cell in that file?