PHP Excel CodeIgniter |
hello, programmers.
Would you help me in this problem? I am using PHPExcel to generate excel files. Now my query looks like this. MODEL: Code: class ReportModel extends CI_Model CONTROLLER: Code: public function getReport() { Now I have attached an excel file. That is how the client wants the report to look like. So basically the report create a sheet per machine. It fills each sheet with the data related to that machine. It groups the result per line number, then per product then per date. Please see the attached file. Thanks so much. I hope I explain myself well. If you have question for clarification please let me know. Thanks!
In your model you need to make another method that reads data for a specific only.
Code: public function getMachineReport($id) { Then in your controller traverse data this way: Code: $objPHPExcel = new PHPExcel(); I need also Excel export, but I've chosen https://github.com/PHPOffice/PhpSpreadsheet , it still has no stable release. At this point "phpoffice/phpspreadsheet": "dev-develop#dfcab0c13f1a53d4bdaf1656ba29495ef94a1f26" it is good enough for me.
I also need export functionality, but i've settled on https://github.com/mk-j/PHP_XLSXWriter as i've always run out of memory with PHPExcel due to the large data sets my users were exporting.
|
Welcome Guest, Not a member yet? Register Sign In |