久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

是否可以使用 PhpExcel 庫生成或克隆數據透視表

Is It Possible To Generate Or Clone Pivot Tables Using PhpExcel Library?(是否可以使用 PhpExcel 庫生成或克隆數據透視表?)
本文介紹了是否可以使用 PhpExcel 庫生成或克隆數據透視表?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

最近我使用 phpExcel 庫在 cakephp 中生成 excel 格式的報告.除了數據透視表外,一切正常.

Recently i have used phpExcel library to generate reports in excel format in cakephp. Every thing is working fine except pivot Tables.

我正在使用主 Excel 工作表(其中包含數據透視表)來克隆/生成其他 Excel 工作表.在新生成的工作表中,其他信息看起來不錯,但未生成數據透視表(僅顯示標題上的名稱.沒有過濾器選項).這是我正在使用的代碼.

I am using a master excel sheet (Which contain pivot table) to clone/generate other excel sheet. In newly generated sheet other information is looking fine but pivot table is not being generated (only names on header are being display. There is no filter options). Here is the code i am using.

        $filename = WWW_ROOT."files/master_report_template/compliance_workflow_master_template.xlsx";
        $reportFileName = WWW_ROOT."files/documents/reports/compliance_workflow_template.xlsx";
        $this->PhpExcel->loadWorksheet($filename); 
        $this->PhpExcel->getActiveSheet()->setCellValue('B1',$this->request->data['fromDate']);
        $this->PhpExcel->getActiveSheet()->setCellValue('B2',$this->request->data['toDate']);
        $this->PhpExcel->getActiveSheet()->setCellValue('B3',date('D-M-y'));
        $row=6;
        foreach($repostData as $rows)
        {
            $col = 0;
            foreach($rows as $key =>$value)
            {   
                $this->PhpExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow($col, $row, $value);
                $col++;
            }
            $row++;
        }
        $this->PhpExcel->save($reportFileName);
        $this->PhpExcel->output(); 

我認為生成的 excel 表將是 Master excel 表的克隆,但兩者都不相同(由于數據透視表).是否有任何好的教程或文檔來生成數據透視表?

I thought that generated excel sheet would be the clone of Master excel sheet but both are not same (due to pivot tables). Is there any good tutorial or documentations to generate pivot table ?

推薦答案

雖然這是一個老問題,但我想給出一個答案:幾個月前我也有同樣的問題,最后決定我需要做我的自己的實現(所以這是自我廣告..)

Albeit this is an old issue, I'd like to give an answer: I had the same issue some months ago and finally decided that I need to do my own implementation (so this is self-advertisement..)

此解決方案遠非完美 - 因為我可能是唯一使用它的人 - 但它完全按照您的描述執行:將原始數據寫入一張主文件"中,允許您創建報告:

This solution is far from perfect - since I'm maybe the only person using it - but it is doing exactly what you describe: Writing raw data into one sheet of a "master file" allowing you to create reports:

https://github.com/svrnm/exceldatatables

這篇關于是否可以使用 PhpExcel 庫生成或克隆數據透視表?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Cannot use #39;Object as class name as it is reserved Cake 2.2.x(不能使用 Object 作為類名,因為它是保留的 Cake 2.2.x)
Session is lost after an OAuth redirect(OAuth 重定向后會話丟失)
Pagination Sort in Cakephp 3.x(Cakephp 3.x 中的分頁排序)
CakePHP Shared core for multiple apps(CakePHP 多個應用程序的共享核心)
Login [ Auth-gt;identify() ] always false on CakePHP 3(在 CakePHP 3 上登錄 [ Auth-identify() ] 始終為 false)
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes)(致命錯誤:允許的內存大小為 134217728 字節已用盡(嘗試分配 87 字節))
主站蜘蛛池模板: 亚洲精品v日韩精品 | 久久毛片网站 | 国产精品夜夜春夜夜爽久久电影 | 亚洲精品www. | 亚洲最新在线视频 | 成人免费网站视频 | 精品一区二区三区免费视频 | 亚洲国产一区二区三区 | 夜夜艹| 日韩欧美亚洲综合 | 伊人伊人 | 国产区精品视频 | 欧美色综合一区二区三区 | 91精品久久久久久久久久入口 | 美女在线视频一区二区三区 | 福利一区二区 | 黄色大片在线视频 | 国产免费一区二区三区 | 国产精品精品 | 亚洲国产成人在线观看 | 毛片99 | 中文字幕在线第一页 | 成人精品视频99在线观看免费 | 欧美日本韩国一区二区 | 秋霞电影一区二区三区 | 国产综合一区二区 | 成人小视频在线观看 | 欧美日韩亚洲国产 | 国产一区二区在线播放视频 | 超碰伊人久久 | 国产成人免费视频网站高清观看视频 | 久久亚洲二区 | 日韩精品av一区二区三区 | 正在播放国产精品 | 欧美a级成人淫片免费看 | 国产a爽一区二区久久久 | 91欧美精品成人综合在线观看 | 91网站在线播放 | 国产在线观看一区二区三区 | 欧美a在线 | 成年人黄色免费视频 |