Home >Backend Development >PHP Tutorial >excel导出,怎么设置单元格式

excel导出,怎么设置单元格式

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:50:561167browse

我使用的是最原始的输出\t \n 的方式
现在遇到超过16位的数字,这样就变成了科学计数的方式
不能使用table和PHPExcel的方式
有什么好的办法能够把数字转成字符串
前后加空格的方式都测试过了,不行

回复内容:

我使用的是最原始的输出\t \n 的方式
现在遇到超过16位的数字,这样就变成了科学计数的方式
不能使用table和PHPExcel的方式
有什么好的办法能够把数字转成字符串
前后加空格的方式都测试过了,不行

"=\"{$column}\""这样就行了

if(is_numeric($column)) {
    $column = "=\"{$column}\"";
}

数字:vnd.ms-excel.numberformat:#,##0.00
遇见过,看这里http://www.blogjava.net/Hopes/article...

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn