Using PHPExcel in Zend Framework 2

For programming and general questions on Zend Framework

Using PHPExcel in Zend Framework 2

Postby prueba2306 on Sat Nov 10, 2012 12:45 am

Hello everyone:

I been using Zend Framework 1 for a while and now Im trying to jump in Zend Framework 2.

I use PHPExcel with ZF1 to generate Excel files dinamically and i don't have problems but i'm trying to use it with ZF2 but i have some problems with the configuration (is not so simple to install/configure any library in ZF2 as in ZF1). I tried to find a solution with Google but the "solutions" are incorrect, incomplete or not clear enough to understand.

Does anyone know what i have to do to use PHPExcel with ZF2? I need to know what configurations i need to do (and where) to use it (maybe some step-by-step answer of how to install/configure any external library in ZF2 would be great).

Thanks for your time and help.
Posts: 1
Joined: Sat May 08, 2010 7:21 pm

Re: Using PHPExcel in Zend Framework 2

Postby dieg1737 on Fri Mar 17, 2017 10:23 pm

For an easy integration of PHPOffice/PHPExcel library into zend framework 2, you can use the zf2 module MvlabsPHPExcel.

After that you need to enable the `MvlabsPHPExcel` module:

Code: Select all
    return [
        'modules' => [
            // ...
        // ...

And after that you be able to use inside the controller.
Code: Select all
$phpExcelObject = $this->serviceLocator->get('mvlabs.phpexcel.service')->createPHPExcelObject();
Posts: 1
Joined: Fri Mar 17, 2017 10:18 pm

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 2 guests