$curCell
=$sheet->getCell($i.$j);
//获取第j行第i列的单元格对象$curValue=$curCell->getValue();
.//获取单元格里面的值if($curCell->getDataType()==PHPExcel_Cell_DataType::TYPE_NUMERIC){$cellstyleformat=$curCell->getParent()->getStyle(
$curCell->getCoordinate() )->getNumberFormat();$formatcode=$cellstyleformat->getFormatCode();
if(strtolower($formatcode) != 'general'){$curValue=gmdate("Y-m-d
h:i:s", PHPExcel_Shared_Date::ExcelToPHP($curValue));
//转为php 时间
} }
PHPExcel判断与转换Excel中的日期
最新推荐文章于 2024-06-05 11:18:59 发布