最简单的导入
$file_name= ‘./Upload/excel/123456.xls‘; import("Org.Util.PHPExcel"); import("Org.Util.PHPExcel.IOFactory"); $objReader = \PHPExcel_IOFactory::createReader(‘Excel5‘); $objPHPExcel = $objReader->load($file_name,$encode=‘utf-8‘); $sheet = $objPHPExcel->getSheet(0); $highestRow = $sheet->getHighestRow(); // 取得总行数 $highestColumn = $sheet->getHighestColumn(); // 取得总列数 $s = $objPHPExcel->getActiveSheet()->getCell("A2")->getValue();
时间: 2024-10-06 01:18:57