使用Spreadsheet_Excel_Reader类实现 $data = new Spreadsheet_Excel_Reader(); $data->setOutputEncoding('CP936'); $data->read($spot_plan_path_file); error_reporting(E_ALL ^ E_NOTICE); // $for_end Use to Traversal Date, The End of The Date fields. $columns = $data->sheets[0]['numCols']; $rows = $data->sheets[0]['numRows'];
导入EXCEL时一般源文件有多少行就导多少行,如果不能获取行数,如何导入所有行?
它的网址如下:http://sourceforge.net/projects/phpexcelreader/
或者
http://d.download.csdn.net/source/412364
$data = new Spreadsheet_Excel_Reader();
$data->setOutputEncoding('CP936');
$data->read($spot_plan_path_file);
error_reporting(E_ALL ^ E_NOTICE);
// $for_end Use to Traversal Date, The End of The Date fields.
$columns = $data->sheets[0]['numCols'];
$rows = $data->sheets[0]['numRows'];