PHP fputcsv转换为具有样式的.xls [英] PHP fputcsv to .xls with style
本文介绍了PHP fputcsv转换为具有样式的.xls的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在PHP上使用fputcsv将一些数据导出到excel工作表.我知道.csv文件不支持样式.是否可以通过将文件另存为.xls来为该文件添加样式?
I am trying to export some data to an excel sheet using fputcsv on PHP. I know that .csv files do not support style. If there any way I can add style to that file by saving the file as .xls?
推荐答案
CSV和XLS格式完全不同.因此,如果要添加样式,则必须创建一个XLS文件(并且忘记fputcsv
:/).
CSV and XLS formats are totally different. So if you want to add style, you have to create an XLS file (and forget fputcsv
:/ ).
看看 PhpExcel .
这篇关于PHP fputcsv转换为具有样式的.xls的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文