I would like to offer an Excel-File for download with PhpSpreadsheet
Here is my code:
require \'vendor/autoload.php\';
use PhpOffice\\PhpSpr
I don't know if your code is from an included file but I had a similar issue. I tried to use __DIR__
constant and it worked, my code looks like this:
$filepath = __DIR__ . "/reports/${filename}_".date("Ymd_Gis").".xlsx";
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->save($filepath);