Extension PhpSpreadSheet always exporting in Excel5 format

It seems that extension PhpSpreadSheet is always exporting in Excel5 format, even though it’s set to use Excel2007 format. Using v.2020.0.13.
Allways getting a .xls file instead of .xlsx.

Make sure you have generated all scripts again after changing the extension setting.

I did. Also ticked composer update. Still having the problem.

I cannot reproduce, it works fine for me, both tables and reports.

If you have any server event or extension which may change the Config(“EXPORT_CLASSES.excel”) setting, you better double check.

Thanks for the reply, it allowed me to find and correct the problem.
It’s the setting in ewcfg.php: It was

“EXPORT_CLASSES” => [
“email” => “ExportEmail”,
“html” => “ExportHtml”,
“word” => “ExportWord”,
“excel” => “ExportExcel”,
“pdf” => “ExportPdf”,
“csv” => “ExportCsv”,
“xml” => “ExportXml”,
“json” => “ExportJson”
],

Once i changed “ExportExcel” to “ExportExcel2007” it started working fine.

However. why is ewcgf.php being generated like this, if I enabled the PhpSpreadsheet extension and set its format to Excel2007? I even tried disabling the extension, saving, enabling it back on and generating code again. Still getting “EXPORT_CLASSES” => [“excel” => “ExportExcel”] instead of “ExportExcel2007”…

If you enable “ExportExcel2007”, PHPMaker generates:

Config(“EXPORT_CLASSES.excel”, “ExportExcel2007”); // Replace the default ExportExcel class

So the only reason might be you did not generate or upload phpfn.php again.

Well, no. This time, I actually deleted ewcfg.php from the web folder, confirmed the extension is enabled with Excel2007 and generated the code again.
Got “excel” => “ExportExcel”.

arbei wrote:

So the only reason might be you did not generate or upload phpfn.php again.

Not ewcfg.php.