i'm receiving error ...notice: undefined offset: 126 in /var/www/clients/client1/web1/web/manage/classes/phpexcel/reader/excel5.php on line 5873 when i'm attempting import .xls file. yet works fine xlsx file. if wave working .xlsx file .xls file fails?
$fpath = "uploads/"; include('./classes/phpexcel.php'); include('./classes/phpexcel/iofactory.php'); // add file name file path $fpath = $fpath . basename($_files['fileupload']['name']); $ext = pathinfo($fpath, pathinfo_extension); if (move_uploaded_file($_files['fileupload']['tmp_name'], $fpath)) { $output = ""; if ($ext == "xlsx") { $filetype = 'excel2007'; } else { $filetype = 'excel5'; } //echo " filetype=$filetype"; $sheetname = 'irbimport'; // read file $objreader = phpexcel_iofactory::createreader($filetype); $objreader->setreaddataonly(true); $objreader->setloadsheetsonly($sheetname); $objphpexcel = $objreader->load($fpath); $excelout = $objphpexcel->getactivesheet(); } else { $output = "failed upload"; } if comment out line $objphpexcel = $objreader->load($fpath); don't error i'm still haven't got clue how resolve?
any appreciated.
file still uploaded, can still read file , rest of code still works.
so i've changed error reporting ini_set('display_errors', 0); ...no more problem :)
Comments
Post a Comment