Reading numbers as text format with PHPExcel

前端 未结 5 1020
醉梦人生
醉梦人生 2020-12-08 08:30

I have an array that can store numbers in such as 01, 01A, 01B, 02, 2, and When I get this value using PHPExcel, it\'s being removed the \'0\'s in case of 01, 02, for exampl

5条回答
  •  情话喂你
    2020-12-08 09:02

    I know this was all posted a while ago, but wanted to share something that worked for me, so you can still use ->fromArray and not have to iterate over the whole spreadsheet.

    If you wrap your values in ="VALUE" it will come through as text, and not convert it, and it will not have quotes around it in your spreadsheet

提交回复
热议问题