Can't unlink xlsx file used with PhpSpreadsheet

Viewed 9

I'm using PhpSpreadsheet to get data from an Excel XLSX file. All works fine but, at the end, after getting data, I can't delete the file with unlink. I have the impression that the file is open. As I understand, \PhpOffice\PhpSpreadsheet\IOFactory::load($filename); opens the file. But there is no \PhpOffice\PhpSpreadsheet\IOFactory::close($filename); method.

How can I delete the XLSX file?

Best,

0 Answers
Related