PHP code example of assada / spreadsheet-reader
1. Go to this page and download the library: Download assada/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/ */
assada / spreadsheet-reader example snippets
// If you need to parse XLS files, include php-excel-reader
heetReader('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);
}
}