I hope somebody can help me with this.
I want to export a html table in excel, I used PHP using this code:
<?php
header("Content-type: application/vnd.ms-excel; name='excel'");
header("Content-Disposition: filename=".$_POST['filename']);
header("Pragma: no-cache");
header("Expires: 0");
echo $_POST['datos_a_enviar'];
?>
The PHP receives a string from another page, and I test it and actually receive the string correctly , however when exporting to Excel, the file you exported is completely empty , even the weight of the file in disk is 0. This only happens when there are many records , because with few records, the excels have the data.
When I was testing in localhost, the excel exports all the data, but when I uploaded to the server, that happens, with a lot of regs, the file is empty.
Thanks for the help, I hope someone can help me.