【问题标题】:html to excel with php. Big numbers converts to exponentialhtml 与 php 相得益彰。大数字转换为指数
【发布时间】:2014-04-24 10:12:40
【问题描述】:

我正在使用phphtml 表导出到excel。我对大数字列有疑问

示例:12345678901234567890

Excel 将其转换为一般格式的1.23457E+19

我想显示完整的数字 - 完全。

【问题讨论】:

  • 扩大列宽不能解决这个问题吗?
  • 将单元格的格式更改为文本,可能会有帮助!
  • 扩展没有帮助
  • 问题出在哪里?在php中还是在excel中?
  • 在这里分享php代码。

标签: php excel number-formatting


【解决方案1】:

为长度 > 10-12 的数字添加单引号。几个零件号我也有同样的问题。

VBA

bigNumber = "'" & bigNumber

PHP

$bigNumber = "'" . $bigNumber

我的 php 很生锈,你可能不得不逃避引用。

【讨论】:

    猜你喜欢
    • 2013-03-19
    • 2011-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-31
    • 2022-12-11
    • 2017-09-16
    • 1970-01-01
    相关资源
    最近更新 更多