PHP code example of chenmobuys / easyexcel
1. Go to this page and download the library: Download chenmobuys/easyexcel library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chenmobuys / easyexcel example snippets
use EasyExcel\Factory;
$filename = 'Excel.xlsx';
$reader = Factory::createReaderForFile($filename);
$readerExcel = $reader->load($filename);
$activeSheet = $readerExcel->getActiveSheet();
foreach ($activeSheet->getRowIterator() as $row) {
// Do something...
}