PHP fputcsv到.xls的风格

PHP fputcsv到.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?

我正在尝试使用PHP上的fputcsv将一些数据导出到Excel工作表。 我知道.csv文件不支持样式。 如果有任何方法我可以通过将文件保存为.xls来为该文件添加样式? p> div>

CSV and XLS formats are totally different. So if you want to add style, you have to create an XLS file (and forget fputcsv :/ ).

Have a look to PhpExcel.