PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.2k forks source link

Class 'PHPExcel_IOFactory' not found #1331

Open Andrew052113 opened 6 years ago

Andrew052113 commented 6 years ago

Hi,

I'm using laravel 5.0 and this code below in my controller works fine during production.

   `$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 <= $highestRow; ++$row) {
        for($col = 0; $col <= $highestColumn; ++$col) {
            $cellValue = $objWorksheet->getCellByColumnAndRow($col, $row) ;
        }
    }`

But when i uploaded it in Philwebhosting, im getting this error.

FatalErrorException in BatchServiceRequest.php line 43: Class 'PHPExcel_IOFactory' not found

I tried adding this code include_once('PHPExcel/PHPExcel.php'); but still getting the same error. How can i resolve this?

Thank you.

CmderQ commented 6 years ago

add /* PHPExcel_IOFactory / require_once '../Classes/PHPExcel/IOFactory.php';