function exread(){
//引入类库
require(‘PHPExcel1/Classes/PHPExcel.php’);
//elsx文件路径
$inputFileName = “1.xlsx”;
date_default_timezone_set(\'PRC\');
// 读取excel文件
try {
inputFileType=PHPExcelIOFactory::identify(inputFileType = PHPExcel_IOFactory::identify(inputFileType=PHPExcelIOFactory::identify(inputFileName);
objReader=PHPExcelIOFactory::createReader(objReader = PHPExcel_IOFactory::createReader(objReader=PHPExcelIOFactory::createReader(inputFileType);
$objPHPExcel = objReader−>load(objReader->load(objReader−>load(inputFileName);
} catch(Exception KaTeX parse error: Expected \’}\’, got \’EOF\’ at end of input: …生错误:\’.pathinfo(inputFileName,PATHINFO_BASENAME).’: \’.$e->getMessage());
}
// 确定要读取的sheet,什么是sheet,看excel的右下角
$sheet = $objPHPExcel->getSheet(0);
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$rowData = $sheet->ToArray(‘A’ . ‘:’ . highestColumn,NULL,TRUE,FALSE);foreach(highestColumn , NULL, TRUE, FALSE);foreach (highestColumn,NULL,TRUE,FALSE);foreach(rowData as k=>k=>k=>v){
foreach ($v as kk=>kk=>kk=>vv){
arr[arr[arr[k][rowData[0][rowData[0][rowData[0][kk]]=KaTeX parse error: Expected \’EOF\’, got \’}\’ at position 13: vv;}̲}unse…arr[0]);
sort($arr);
return $arr;
}