PHP code example of nox-it / yii2-nox-spreadsheet-reader
1. Go to this page and download the library: Download nox-it/yii2-nox-spreadsheet-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/ */
nox-it / yii2-nox-spreadsheet-reader example snippets
$reader = new SpreadsheetReader('example.xlsx');
foreach ($reader as $row) {
print_r($row);
}
$reader = new SpreadsheetReader('example.xlsx');
$sheets = $reader->Sheets();
foreach ($sheets as $index => $name) {
echo 'Sheet #'.$index.': '.$name;
$reader->ChangeSheet($index);
foreach ($reader as $row) {
print_r($row);
}
}