I am trying to read from an excel sheet using php spreadsheet reader.
require('excel/php-excel-reader/excel_reader2.php');
require('excel/SpreadsheetReader.php');
$uploadFilePath = 'batch_upload.xlsx';
$Reader = new SpreadsheetReader($uploadFilePath);
$Sheets = $Reader->Sheets();
foreach ($Sheets as $Index => $Name)
{
echo 'Sheet #'.$Index.': '.$Name;
$Reader -> ChangeSheet($Index);
foreach ($Reader as $Row)
{
print_r($Row);
}
}
If the spreadsheet contains only single page it is returning an empty array. But if there is a second sheet then for both sheet the returning value will be that of the second sheet. The first-sheet values are not processing.
xlsx sheets that i have used
The plugin git repo is https://github.com/nuovo/spreadsheet-reader
Thanks in advance.