Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zhangludi/e1fc8c8e46f04d18dfcadcd95b1065de to your computer and use it in GitHub Desktop.
Save zhangludi/e1fc8c8e46f04d18dfcadcd95b1065de to your computer and use it in GitHub Desktop.
PHPExcel 导出文本变成科学记数法解决办法
解决办法:在列写入值的时候,在值的前后加上"\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