现在要求用Ext导出Excel,如果单独运行要导出内容的代码是没有问题的,可是如果要通过Ext去请求这个要导出内容的页面时就出问题了,它不弹任何框出来,等待告诉解决这个问题,

解决方案 »

  1.   

    参考http://www.google.com.hk/search?sourceid=chrome&ie=UTF-8&q=php%E5%A6%82%E4%BD%95%E5%AF%BC%E5%87%BAExcel
      

  2.   

    给个google查询,楼上的也太不厚道了.
    推荐楼主使用开源免费的 PHPExcel,我在项目中用过,很好推荐
    下载地址 http://phpexcel.codeplex.com/
    这里是使用方法和说明
    http://www.zeali.net/entry/556
    http://developer.51cto.com/art/200912/168322.htm给分啊,谢谢
      

  3.   

    PHPExcel确实比较好用,但是楼主的这个问题可能不是EXCEL的问题,而是不弹出下载框的问题,你添加一下如下代码,当按钮点击时:
    <?php
    $filename = "/somepath/".$_GET['file'].".xls";    //要下载的文件名
     
    header("Content-Type: application/force-download");
    header("Content-Disposition: attachment; filename=".basename($filename));  
    readfile($filename);
     
    ?>
      

  4.   

    phpexcel的确比较好用。
    建议使用这个。
    还有楼主所说的通过 ext 请求,难道是AJAX?AJAX又乍样能做下载呢。
      

  5.   

    可参考下
    header("Content-Type: application/force-download");    
    header("Content-Type: application/octet-stream");    
    header("Content-Type: application/download");    
    header('Content-Disposition:inline;filename="'.$outputFileName.'"');    
    header("Content-Transfer-Encoding: binary");    
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");    
    header("Pragma: no-cache");    
      

  6.   

    phpexcel还不错·