My code have a problem

Topics: Developer Forum, Project Management Forum, User Forum
Apr 16, 2012 at 8:15 AM

when i use the PHPExcel for Excel import , get a error:
    Fatal error: Uncaught exception 'Exception' with message 'Autofilter must be set on a range of cells.' in D:\workspace\source\testsvn2\include\phpexcel\PHPExcel\Worksheet.php:1624 Stack trace: #0 D:\workspace\source\testsvn2\include\phpexcel\PHPExcel\Reader\Excel2007.php(845): PHPExcel_Worksheet->setAutoFilter('A1') #1 D:\workspace\source\testsvn2\backoffice\product\b2c_new_product_upload.php(915): PHPExcel_Reader_Excel2007->load('C:\Windows\Temp...') #2 {main} thrown in D:\workspace\source\testsvn2\include\phpexcel\PHPExcel\Worksheet.php on line 1624 

and the excel file is use PHPExcel export.

Need help,thanks! 

Apr 16, 2012 at 9:54 AM

how about you read the exceptions message? I think you need to specify a range for your autofilter! probably something like A1:A255 or something

Apr 16, 2012 at 10:06 AM

but i does not use autofilter
===================
now ,It's works ,I think because my Excel Template error. 

Thank you!