PHP code example of avadim / fast-excel-reader
1. Go to this page and download the library: Download avadim/fast-excel-reader 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/ */
avadim / fast-excel-reader example snippets
use \avadim\FastExcelReader\Excel;
// XLSX, legacy XLS and CSV are all opened this way; the reader is chosen by the file signature
$excel = Excel::open(__DIR__ . '/files/demo.xlsx');
// Read all rows into a two-dimensional array (ROW x COL)
$rows = $excel->readRows();
// Or read row by row (memory efficient)
$sheet = $excel->sheet();
foreach ($sheet->nextRow() as $rowNum => $rowData) {
// handle $rowData
}