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