dongshandun4363 2013-09-15 20:09
浏览 57
已采纳

防止Excel以科学计数法格式化文本[关闭]

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条回答 默认 最新

  • duanpie4763 2013-09-15 20:41
    关注

    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).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?