Service for easy Excel export with PHPExcel Library
Add the following lines in your deps
file :
[ExcelBundle]
git=http://github.com/rgazelot/ExcelBundle.git
target=/bundles/Export/ExcelBundle
Now download the bundle by running the command :
./bin/vendors update
Symfony will install your bundle in vendors/bundles/Exports
Declare in the autoload.php
:
# app/autoload.php
$loader->registerNamespaces(array(
...
'Export' => __DIR__.'/../vendor/bundles',
));
coming soon ...
Enable the bundle in the kernel :
# app/AppKernel.php
$bundles = array(
...
new Export\ExcelBundle\ExportExcelBundle(),
);
Because the PHPExcel library not use namespaces, create prefixes in autoload.php
.
# app/autoload.php
$loader->registerPrefixes(array(
...
'PHPExcel' => __DIR__.'/../vendor/bundles/Export/ExcelBundle/Library/phpExcel/Classes',
));
In your configuration file :
# app/config/config.yml
export_excel: ~
Congratulations ! You have installed ExportBundle. Read the usage documentation for learn how to use the service.