I\'m trying to export HTML table content to excel. I saw this solution which worked but not as I expected it (because I can\'t choose which columns to copy
I made something very similar and use it every day in my office following a tutorial found on the web. You can use this template for PHP:
$filename="sheet.xls";
header ("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=$filename");
?>
Titolo
for ($i=1;$i < 11; $i++)
{
echo "";
for ($j=1; $j<11;$j++)
{
$a = $i * $j;
echo "$a ";
}
echo " ";
}
?>
You can write something similar with JS, just generate a simple table with HTML tags and be sure to write the correct code in the header.