Php Excel Combo Box

Topics: Developer Forum, Project Management Forum, User Forum
Aug 10, 2010 at 1:33 PM

When I sent all my choices into setformula1 ( function of DataValidation) as parameter,it does not produce dropdown filter box in the file,

My code is below:

$objValidation = $objPHPExcel->getActiveSheet()->getCell('B'.$i)
         ->getDataValidation();
         $objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
         $objValidation->setAllowBlank(false);
         $objValidation->setShowDropDown(true);
        $objValidation->setFormula1('"10000000 : Canlı Organizma,11000000 : Tekstil/Mineral,12000000 : Kimyasal,13000000 : Plastik"');
                                ,14000000 : Kağıt,15000000 : Yakıt,20000000 : Madencilik,21000000 : Tarım/Orman/Balıkçılık,22000000 : İnşaat/İmar,23000000 : Endüstriyel üretim
                                ,24000000 : Materyal Saklama,25000000 : Otomotiv,26000000 : Enerji,27000000 : Makina ve Araç,30000000 : Yapı/İnşaat,31000000 : Üretim,32000000 : Elektronik
                                ,39000000 : Elektrik,40000000 : Dağıtım,41000000 : Laboratuar/Tıp,42000000 : Tıp/Medikal,43000000 : Bilgisayar/TV/Telekom,44000000 : Ofis,45000000 : Matbaa/Ses/Görüntü
                                ,46000000 : Güvenlik,47000000 : Temizlik,48000000 : Hizmet Endüstrisi,49000000 : Spor/Rekrasyon,50000000 : Gıda/İçecek,51000000 : İlaç,52000000 : Ev aletleri/Elektronik
                                ,53000000 : Kişisel Ürünler,54000000 : Saat/Mücevher,55000000 : Basılı ürünler,56000000 : Mobilya/dekorasyon,60000000 : Müzik/oyuncak/eğitim,70000000 : Tarım/Orman/Balıkçılık
                                ,71000000 : Maden/Petrol/Gaz,72000000 : Yapı/inşaat,73000000 : Endüstriyel Üretim,76000000 : Endüstriyel Temizlik,77000000 : Çevre,78000000 : Kargo/Depolama
                                ,80000000 : Yönetim,81000000 : Mühendislik/AR-GE,82000000 : Grafik/Güzel Sanatlar,83000000 : Elektrik/Su/Telefon vs.,84000000 : Finans/sigorta,85000000 : Sağlık
                                ,86000000 : Eğitim,90000000 : Turizm,91000000 : Kişisel,92000000 : Savunma/Güvenlik,93000000 : Toplumsal,94000000 : Klüp/Organizasyon"');

when I decrease choices,it works like I want but now  it does not produce dropdown filter box in the file

so that I think (not sure) the reason of this the character limit of parameter of setformula1 function it not large enough for my choices(string).

How can I raise the character limit of setformula1 function of DataValidation object?

                                                                                                                                    Thank you...