Hướng dẫn class phpexcel_iofactory not found - lớp phpexcel_iofactory không tìm thấy

Tôi đã làm theo hướng dẫn này ở đây

//arjunphp.com/how-to-use-phpexcel-with-codeigniter/

và đây

//www.ahowto.net/php/easily-integrateload-phpexcel-into-codeigniter-framework/

Tuy nhiên, tôi vẫn nhận được lỗi không tìm thấy PhpExcel_iofactory. Tôi đã không tìm thấy nhiều sự giúp đỡ trong lĩnh vực này. Có một plugin excel thay thế hoặc có cách nào để giải quyết vấn đề này không?

Đây là bộ điều khiển của tôi xây dựng

public function __construct[] {        
        parent::__construct[];
        $this->load->library['Excel'];
    }

Đây là chức năng tải lên bộ điều khiển của tôi

$objReader= PHPExcel_IOFactory::createReader['Excel2007'];
$objReader->setReadDataOnly[true]; 
$objPHPExcel= PHPExcel_IOFactory::load[$document_folder."/".$file_name.".".$file_extension];    
//        $this->response[$objPHPExcel];
$objPHPExcel=$objReader->load[$document_folder."/".$file_name.".".$file_extension]; 
$totalrows=$objPHPExcel->setActiveSheetIndex[0]->getHighestRow[];
$objWorksheet=$objPHPExcel->setActiveSheetIndex[0];  
for[$i=2;$igetCellByColumnAndRow[0,$i]->getValue[];     
    $first_name= $objWorksheet->getCellByColumnAndRow[1,$i]->getValue[];            
    $last_name= $objWorksheet->getCellByColumnAndRow[2,$i]->getValue[]; 
    $date_of_birth= $objWorksheet->getCellByColumnAndRow[3,$i]->getValue[]; 
    $email=$objWorksheet->getCellByColumnAndRow[4,$i]->getValue[];
    $phone_number=$objWorksheet->getCellByColumnAndRow[5,$i]->getValue[]; 
    $company=$objWorksheet->getCellByColumnAndRow[6,$i]->getValue[]; 
    $input=array[
          'title'=>$title, 
          'first_name'=>$first_name,
          'last_name'=>$last_name,
          'date_of_birth'=>$date_of_birth,
          'email'=>$email,
          'phone_number'=>$phone_number,
          'company'=>$company,
     ];

Mattyy21, bạn có thể vui lòng giải thích chi tiết hơn về cách bạn đã sửa lỗi không?

   `$objPHPExcel = \PHPExcel_IOFactory::load["excel_files/temp_files.xlsx"]];
    $objWorksheet = $objPHPExcel->getActiveSheet[];
    $highestRow = $objWorksheet->getHighestRow[];
    $highestColumn = \PHPExcel_Cell::columnIndexFromString[$objWorksheet->getHighestColumn[]];

    for [$row = 3; $row 

Bài Viết Liên Quan

Chủ Đề