Created
June 11, 2019 02:17
-
-
Save zhangludi/e1fc8c8e46f04d18dfcadcd95b1065de to your computer and use it in GitHub Desktop.
PHPExcel 导出文本变成科学记数法解决办法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
解决办法:在列写入值的时候,在值的前后加上"\t",记住一定要双引号。 | |
$excel->setActiveSheetIndex(0)->setCellValue("A" . $i,"\t". $v['pk_name']."\t") | |
->setCellValue("B" . $i, "\t". $order_name."\t") | |
->setCellValue("C" . $i, "\t". $v['order_real_price']."\t") | |
->setCellValue("D" . $i, "\t". $v['order_username']."\t") | |
->setCellValue("E" . $i, "\t". $v['order_user_phon']."\t") | |
->setCellValue("F" . $i, "\t". $v['order_id_num']."\t") | |
->setCellValue("G" . $i, "\t". $v['order_time']."\t") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment