<?
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"; 
?>

解决方案 »

  1.   

    PHP有两种方法调EXCEL:
    1.<object classid="clsid:0002E510-0000-0000-C000-000000000046" id="Spreadsheet1" codebase="file:msowc.cab" width="500" height="200"></object>
    2.com编程
    $ChartSpace1=new COM("OWC.Chart.9");
      

  2.   

    应该是new COM("OWC.Spreadsheet.9");
      

  3.   

    php的官方网站有,你找header函数就行,我那次也是那样子做的!
      

  4.   

    <?
    header("Content-type:application/xls");
    header("Content-Disposition:attachment;filename=test1.xls");?>
      

  5.   

    好啊。
    确实是这样,谢谢。能不能把header函数给详细说一下吗?
    或者推荐个学习的好地方。
    要详细。哦