Ads 4 You

How to install yii2 phpexcel extension 2018

Email Id : phpmk888@gmail.com

How to install yii2 phpexcel extension 2018

The preferred way to install this extension is through composer.

 
Run Command : composer require phpoffice/phpexcel



Further Information Code

Read excel file from directory and Removing empty columns and rows
Removing empty columns and rows


 


try {
  $objPHPExcel = \PHPExcel_IOFactory::load('samplefile.xlsx');         
  $sheet = $objPHPExcel->getActiveSheet();
  $highestRow = $sheet->getHighestRow();
  $highestCol = 'R'; //$sheet->getHighestColumn();
  $sheetData = $sheet->rangeToArray("A1:$highestCol$highestRow", null, true, false, false);
  print '';
  print_r($sheetData);
} catch (Exception $e) {
  return 'Error loading file';
    }
}

    

Comments

  1. Nice information. Thanks for sharing content and such nice information for me. I hope you will share some more content about. Please keep sharing!
    Offshore Angular Development Company – Nintriva

    ReplyDelete

Post a Comment