1

I am using PHPExcel for upload xls files. when I upload this file

(https://drive.google.com/file/d/0B9Hz_h5HT4slblFrSlljTDNwWE0/view?usp=sharing), I have error in $objPHPExcel = PHPExcel_IOFactory::load($this->file_path); line

public function read() {

    $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
    $cacheSettings = array('memoryCacheSize' => '100MB');
    PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);        

    $objPHPExcel = PHPExcel_IOFactory::load($this->file_path);
    $objPHPExcel->setActiveSheetIndex($this->sheet_number);
    $this->data = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);

    return $this;
}

Exception log:

Undefined offset: 15
 /home/importer/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php:3554
 /home/importer/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php:814
 /home/importer/vendor/phpoffice/phpexcel/Classes/PHPExcel/IOFactory.php:192

How can I fix this error?

soumya
  • 3,801
  • 9
  • 35
  • 69
user1142806
  • 79
  • 1
  • 6

0 Answers0