0
if ($file_extension == "xlsx") {
include("excel/PHPExcel.php");
include("excel/Excel2007.php");
$objPHPExcel = PHPExcel_IOFactory::load($_FILES['filename']['tmp_name']);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
foreach($sheetData as $row) {
//// How to put all cells in array in one shot because we can not assign each like $row['A'] ,$row['B']
array_push($array, strval($row['A']));
//row A2;
//array_push($array,strval($row['B']));
//etc...
}
}
如何将所有单元格放入数组而不指定每个单元的名称?如何在数组中插入()数据
因为写起来非常困难$row['A']
,$row['B']
,$row['C']
...... For Each。
如何将所有数据放入数组而不指定行的名称?