HTML table export to Excel (XLS or CSV)

后端 未结 2 1444
误落风尘
误落风尘 2021-01-20 02:10

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

2条回答
  •  悲哀的现实
    2021-01-20 03:10

    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:

    
    
    
    Titolo
    
    ";
       for ($j=1; $j<11;$j++)
       {
          $a = $i * $j;
          echo "";
       }
       echo "";
    }
    ?>
    
    $a

    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.

提交回复
热议问题