How to generate EXCEL report in Magento?
1)Get the PHP EXCEL library;
There are twooptions:
1.1)Use the PHP officiallibrary: PEAR package:
http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.php
1.2)Use popular thirdparties library:
http://phpexcel.codeplex.com/
2)Create the Report extension;
2.1)Module Files:
You have to define theconfiguration file, block, model, helper and controller;
2.2)Basic logic:
In your controller'saction method, you will use Magento database layer tofetch
the dataset.
After you get yourdesired dataset, the EXCEL writer instance is declared torender
the dataset.
Finally, you call theZend_Controller_Response_Http to send the excel file for your
browser.
[Small Tips]:Your canuse layout class to append and replace contents.