Error export to Excel

Hi Johnny

Can you put this code in the export to excel ExportState.php please:

// Redirect output to a client’s web browser (Excel2007)
header(‘Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet’);
header(‘Content-Disposition: attachment;filename="’ . str_replace([“\n”,“\r”],“”, $filename) . ‘.xlsx"’);
header(‘Cache-Control: max-age=0’);

Thanks

Hello @NOLO ,

Unfortunately we on purpose have this as a downloadable item for Grocery CRUD since this is the most common usage when it comes to excel export. If you would like to use your own way to export the excel (which make sense) you can use the replaceState method . There is an example for excel specifically that you can check: replaceState - Grocery CRUD - A PHP CRUD Generator Library

The export to excel is not changing that often so it is safe to assume that replaceState will also work on future versions as well.

Regards
Johnny