I have this code that exports a html table to excel.
print $obj->methodThatReturnTable();
header("Content-type: application/vnd.ms-excel");
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=$fileName");
header("Pragma: no-cache");
It works fine for tables with a few rows, but now I have created a table with almost 1000 rows (8 columns) and instead of the download be forced, the table is showed in the browser.
What could be happening?