注:phpexcel无法读取包含图片的excel,如果读取会报编码错误 

header("content-Type: text/html; charset=UTF-8");
error_reporting(E_ALL);
require 'include/PHPExcel/Classes/PHPExcel.php';
require 'include/PHPExcel/Classes/PHPExcel/Reader/Excel2007.php';
$excel_file = '2007.xlsx';

$PHPExcel = new PHPExcel();
$PHPReader = new PHPExcel_Reader_Excel2007(); //还有这句
$PHPExcel = $PHPReader->load($excel_file);
$sheet = $PHPExcel->getActiveSheet();
$allCol=PHPExcel_Cell::columnIndexFromString($sheet->getHighestColumn());
$allRow=$sheet->getHighestRow();
for($col=1; $col<=$allCol;$col++)
{
for ($row=0;$row<$allRow;$row++)
{
echo $sheet->getCellByColumnAndRow($row,$col)->getValue()." ";
}
echo "<br/>";