http://www.phpe.net/articles/289.shtml
上面有详细说明

解决方案 »

  1.   

    生成Excel
    <? 
    header("Content-type:application/vnd.ms-excel"); 
    header("Content-Disposition:filename=test.xls"); 
    echo "test1\t"; 
    echo "test2\t\n"; 
    echo "test1\t"; 
    echo "test2\t\n"; 
    echo "test1\t"; 
    echo "test2\t\n"; 
    echo "test1\t"; 
    echo "test2\t\n"; 
    echo "test1\t"; 
    echo "test2\t\n"; 
    echo "test1\t"; 
    echo "test2\t\n"; 
    ?>
      

  2.   

    又生成pdf的程序 excel的也有
    就看你怎么转换了
    先把原始数据读出来,然后,再新生成一个