PHPExcel featured in phparchitect / November 2008

Edit on GitHub

Cover of php|architect / November 2008 Nice to see that there's a lot of activity going on related to PHPExcel! This weekend, I receievd my electronic copy of php|architect / November 2008 featuring an article on generating PDF and Excel files using PHP. Guess which library is being used in the second part of the article...

While reading the article, I noticed a very cool thing: the author, Aaron Wormus, is using a convenient way to generate charts in PHPExcel using Google Charts API. Since PHPExcel currently does not support creating graphs, this is really a good method to use charts in PHPExcel generated Excel files. Here's a screenshot of the generated file in the magazine:

image 

Sweet!

This is an imported post. It was imported from my old blog using an automated tool and may contain formatting errors and/or broken images.

Leave a Comment

avatar

8 responses

  1. Avatar for renganathan
    renganathan December 11th, 2008

    How to Create Excel Sortlist in php coding

  2. Avatar for maartenba
    maartenba December 11th, 2008

    Check the PHPExcel manual on that (autofilter)

  3. Avatar for alains
    alains September 30th, 2009

    bonjour,

    je n'arrive pas &#224 utiliser PHPExcel
    j'obtiens :

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homez.194/plaidoye/www/PHPExcel.php on line 70

    je dois oublier quelque-chose d'&#233vident pour vous

    voici le d&#233but du source de mon php :

    /** PHPExcel */
    require_once 'PHPExcel.php';

    /** PHPExcel_Cell_AdvancedValueBinder */
    require_once 'PHPExcel/Cell/AdvancedValueBinder.php';

    /** PHPExcel_IOFactory */
    require_once 'PHPExcel/IOFactory.php';

    $objReader = PHPExcel_IOFactory::createReader('Excel2007');
    $objReader->setReadDataOnly(true);

    $objPHPExcel = $objReader->load("FichiersDesEcoles/Liste_ecoles.xls");
    $objWorksheet = $objPHPExcel->getActiveSheet();

    merci d'avance pour votre compr&#233hension

  4. Avatar for maartenba
    maartenba September 30th, 2009

    Are you using PHP 5.2+? Latest PHPExcel version?

  5. Avatar for alains
    alains September 30th, 2009

    thank you very uuch for your answer
    i am using the release I found on your site so called : PHPExcel 1.7.0 Production
    is it correct ?

    AS

  6. Avatar for maartenba
    maartenba September 30th, 2009

    That should work with PHP > 5.2.x

  7. Avatar for alains
    alains September 30th, 2009

    After having changed some parameter in order to use PHP 5 this problem disappeared.

    it happened only some minutes before now

    but now comes a new problem

    my Excel file size is 5 MO

    the load function aborts because of lack of memory

    I understand that the whole file is put into RAM

    It works if the file size is < 150 KO

    Is it possible not to load the whole file into memory ?

  8. Avatar for alains
    alains September 30th, 2009

    I changed some parameter to use PHP 5 and now it works !
    but now appears a new problem : the memory size (mutualized server) is not enough
    (32 MO)
    the file's size is 5 MO
    It seems that when in RAM, it needs more than 32 MO

    so if I load only one sheet I have the following problem :

    this sheet contains formulas refering to other sheets which are not loaded

    -> the cells containing formulas have no more values

    is it possible to do better ?