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
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';
}
}
Nice information. Thanks for sharing content and such nice information for me. I hope you will share some more content about. Please keep sharing!
ReplyDeleteOffshore Angular Development Company – Nintriva