2
PhpSpreadsheet 读取xls文件 3:06:30 自动转换为浮点数float 0.12663194444444 问题 -...
source link: https://www.cnblogs.com/tinywan/p/15467790.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PhpSpreadsheet 读取xls文件 3:06:30 自动转换为浮点数float 0.12663194444444 问题
读取文件
读取代码
$reader = new Xls(); $reader->setReadDataOnly(true); $excel = $reader->load($_FILES['file']['tmp_name']); $excelArray = $excel->getSheet(0)->toArray(); halt($excelArray);
打印内容
可以看出以上 3:06:30 被转换了 0.008217592592593
解决方式代码参考
$excel = IOFactory::load($_FILES['file']['tmp_name']); $excelArray = $excel->getSheet(0)->toArray(); halt($excelArray);
打印数据
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK