May 26, 2009 at 10:06 AM


     I use the PHPExcel 1.6.7 it's great library but I have a probleme with it.

     I need to create a combo box but I don(t know how to do.

     Can I use this library for create a combo box ?

Thanks you

May 26, 2009 at 10:34 AM

Combo boxes are not possible at the moment. Unfortunately.

Also, this is quite complicated stuff, so, given all the other requested enhancements, it may take time before we see such thing in PHPExcel.


May 26, 2009 at 10:57 AM

Thank you for your reply but I found how to do it

    I can use DataValidation object

    $objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation();

    $objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );

    $objValidation->setFormula1('"Item A,Item B,Item C"');

   But the problem is that run only with Excel2007


May 26, 2009 at 8:48 PM

Ok, I had misunderstood your question. You are correct that DataValidation is not supported by PHPExcel_Writer_Excel5. This is something I would like to look at in the future, but first the formula parser for PHPExcel_Writer_Excel5 needs to be fixed first. It is unfortunately quite buggy at the moment. This could easily amount to 2 months of full-time work.

Once this is ready, I will start to look at data validation, conditional styling etc. for PHPExcel_Writer_Excel5 and PHPExcel_Reader_Excel5.