phpexcel imports data expressed in scientific notation
習慣沉默
習慣沉默 2017-05-24 11:33:34
0
2
1390

Recently, there has been a problem with using phpexcel to import excel tables (excel2007). If the numbers in the table are too long, excel will sometimes express them in scientific notation. During the import, the data table will also store the data in scientific notation. If the cell number is expressed in zip code, although it is expressed as a long number on the excel sheet, it will still be expressed in scientific notation when imported into the data table.

I have tried adding string and getFormattedValue() in front of the $objPHPExcel object but it cannot be changed. How should I solve it without processing the excel table? .

Originally, I was thinking about how to deal with this situation when a customer encounters it. . But it seems that the phpexcel object passed in is already a character in scientific notation, and even if it is number_format, it cannot be converted back to the previous number. . We can only ask the customer to deal with it first. .

習慣沉默
習慣沉默

reply all(2)
伊谢尔伦

I just add a single quote at the front.

大家讲道理

number_format

$num = 1.00E+36;
var_dump($num);
var_dump(number_format($num));    //返回的是string类型
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!