开发者

Export to CSV with customizing the font color using PHP

In my application i am able to export data to CSV file successfully, But i need some 开发者_JAVA技巧contents of the CSV file to be in "bold" and "color". So is it possible way to do it? If so please help me out.


If it is a valid option, you can export to Excel format using PHPExcel. This supports font color, weight etc..


The basic CSV file format doesn't have any way to represent such attributes. If the file is to be read by a specific application, maybe it supports a richer format that you can output in?


As others have said, you can not do it with CSV. But if your target program to read the CSV is Excel, you can create a XLS spreadsheet.

But I have had very good success using Spreadsheet_Excel_Writer: http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.php

Give it a shot.


CSV file is just comma separated values file so it can't be formatted. this is a simple text file with .csv extension. If you want to format then exporting into excel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜