Home > Backend Development > PHP Tutorial > 上传xls文档,其中一个列的值太长,读取到的变成科学计数法,详细见内容

上传xls文档,其中一个列的值太长,读取到的变成科学计数法,详细见内容

WBOY
Release: 2016-06-23 14:15:01
Original
944 people have browsed it

1. 上传xls
2. 其中一个列叫 运单号,值有22位,格式如下
   订单编号  运单号                      物流
      1        1234567890987654321234      usps
      2        1234567890987654323224      usps
                ... ...
PHP处理代码:
                    $xls_obj=new Helper_Excel();
                    $xls_obj->readFile($filename);
                    $sheet=$xls_obj->toHeaderMap();
                    foreach ($sheet as $key=>$row){... ...}
读到的这个运单号就变成科学计数法了。
Excel文档的这列已经改成了文本格式

请各位给个思路 谢谢


回复讨论(解决方案)

把他当作字符串处理,int类型越界了.

我想了一下 应该是底层的Excel处理类可能有问题。
我自己先去看看

找到解决办法没有?我也遇到这样的问题了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template