Prevent Excel from reformatting text in the scientific notation [closed]

天大地大妈咪最大 提交于 2019-12-04 05:27:32

问题


I have a PHP script which exports data from database to different formats, including as an Excel document. If a text field contains such a value as 123123123123, Excel, by default converts it to 1.23123E+11. Is it possible to prevent this absolutely unnecessary behaviour?


回答1:


If your goal is to store the number as text (and not do math on it later) and the PHP is exporting as a CSV, a simple solution would be to export the number as a CONCATENATE function.

=CONCATENATE(123123123123) renders as 123123123123 in text format when the CSV is opened in Excel (this is for Excel 2010).



来源:https://stackoverflow.com/questions/18816995/prevent-excel-from-reformatting-text-in-the-scientific-notation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!