phpでcsvとexcelを簡単に出力
1239 ワード
<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Dispotion:filename='test.xls' ");
echo "a\t b\t c
";
echo "aa\t bb\t cc
";
echo "aaa\t bbb\t cccc
";
<table width="500" border=1>
<tr><td colspan=2> excel</td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>1</td>
<td>one</td>
</tr>
<tr>
<td>2</td>
<td>two</td>
</tr>
<tr>
<td>=A3+A4</td>
<td>=SUM(B3:B4)</td>
</tr>
</table>
?>