Phpexcelreader super easy to use
The PHP class can be downloaded to the official website: http://www.codeplex.com/PHPExcel, the downloaded files can not be used directly to see the following remarks.
Note:
1, to change the oleread.inc to oleread.php, modify the file name.
2, to be reader.php in the 31st paragraph code: require_once ' spreadsheet/excel/reader/oleread.php ';
Change to the file path of note 1: require_once ' oleread.php ' (assuming oleread.php and reader.php are in the same directory)
3. When an error code appears:deprecated:assigning The return value of new by reference is Deprecated. Your PHP version is greater than 5.3, and 5.3 does not support the "=&" symbol, which supports the "=" symbol, so replace the "=&" symbol in the reader.php file with the "=" symbol.
4, self-jxlrwtest.xls files have errors, you need to create a new XLS file yourself to test
5, some other garbled what problem, here does not explain, look at the title you understand (simple use)
Code features: Show all data for this XLS file
#Test.xls the xls file to import
#$data->sheets[0][' numrows ') gets the maximum number of rows
#$data->sheets[0][' numcols ') gets the maximum number of columns
#$data->sheets[0][' cells ' [$i] [$j] get data for a cell
<?phprequire_once ' reader.php ';
$data = new Spreadsheet_excel_reader (); $data->read ('test.xls');
$data->sheets[0][' numrows ']; $i + +) { $data->sheets[0][' numcols ']; $j + +) { echo "\" ". $data->sheets[0][' cells ' [$i] [$j]. " \","; } echo "<br/>";}