Closed sarveshshejwadkar closed 8 years ago
please mr Sarvesh123, have u been able to rectify this issue. cuz am having the same problem here.
@adexope try working with XLS file instead of XLSX
@sarvesh123 thanks a lot,
Same errors for me. I renamed my .xlsx file to .xls but I have :
The filename myfile.xls is not readable
How did you resolved it ?
@Klemart3D Sorry, i do not recollect coming across that issue. Could be file permissions
Code: require DIR.'/spreadsheet-reader/SpreadsheetReader.php';
$ProductsReader = new SpreadsheetReader('C:\UniServerZ\www\new_prj\uploads\771168_20151223_054601_S.xlsx');
foreach ($ProductsReader as $Row) { print_r($Row); }
Above is the code i use to read XLSX files from a subfolder uploads. The scripts throws the below errors. But the script works fine when file is in the same folder as the php script.
Errors: Warning: Invalid argument supplied for foreach() in C:\UniServerZ\www\new_prj\sp readsheet-reader\SpreadsheetReader_XLSX.php on line 371
Warning: XMLReader::open(): Empty string supplied as input in C:\UniServerZ\www\ new_prj\spreadsheet-reader\SpreadsheetReader_XLSX.php on line 959
Warning: XMLReader::read(): Load Data before trying to read in C:\UniServerZ\www \new_prj\spreadsheet-reader\SpreadsheetReader_XLSX.php on line 995 Array ( )
Warning: XMLReader::read(): Load Data before trying to read in C:\UniServerZ\www \new_prj\spreadsheet-reader\SpreadsheetReader_XLSX.php on line 995