用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2376|回复: 0
收起左侧

xls 匯出問題

[复制链接]
发表于 2011-1-27 17:36:39 | 显示全部楼层 |阅读模式
本帖最后由 see52001 于 2011-1-28 09:51 编辑

http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8

請問一下
這個 有辦法
把她 用 到 ci 裡面嗎

因為 我把她 丟到 library 裡面
然後 在 c 裡面呼叫
卻發現 執行 結果 有問題
沒辦法 換行 換列...

下面是我用更簡單的方式執行
卻發現 \t 沒作用
所以想問一下 我是哪邊用錯了
class New_Print extends Controller {
        function __construct()
        {
                parent::Controller();
        }

       public function index()
        {
                header("Pragma: public");
                header("Expires: 0");
                header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
                header("Content-Type: application/force-download");
                header("Content-Type: application/octet-stream");
                header("Content-Type: application/download");;
                header("Content-Disposition: attachment;filename=test.xls");
                header("Content-Transfer-Encoding: binary ");
               
               echo "111\t222\t333\t444\t555\t666\n";
        
        }
}

本版积分规则