【发布时间】:2015-03-20 19:29:06
【问题描述】:
当我在 LibreOffice Calc 中显示为 02/19/2015 23:59:40 的行/列上使用 PHPExcel 的 getFormattedValue() 时,我会返回 42067.458524537。如何将其转换为 02/19/2015 23:59:40?
我的PHP代码如下:
<?php
include('/path/to/PHPExcel.php');
$filePath = 'filename.xlsx';
$inputFileType = PHPExcel_IOFactory::identify($filePath);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$excel = $objReader->load($filePath);
$worksheet = $excel->getSheet();
echo $worksheet->getCellByColumnAndRow(3, 4)->getFormattedValue();
【问题讨论】:
-
我没有 - 这是一个非常有用的链接 - 谢谢!