📜  phpexcel rangetoarray 日期格式 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:54.480000             🧑  作者: Mango

代码示例1
$get_excel_data = $objPHPExcel->getActiveSheet()->rangeToArray("A1:".$highestColumn.$highestRow);           
$i = 1; 
foreach($get_excel_data as $val) {
    //In my case, 2nd column is a date so that I format using 
    $date = date('Y-m-d',PHPExcel_Shared_Date::ExcelToPHP($objWorksheet->getCellByColumnAndRow(1, $i)->getValue()));  // array index 1              
}