View Full Version : Saving data in CSV in PHP

04-23-2012, 10:20 PM
I have made a function to save data in a CSV file, for this I used the codes on PHP Manual website here:


The codes works, except, when I open the file in Excel, I want also a title to appear above the table cell for each column. For example, let's say in the first column of the excel sheet, I am saving some car brands, but can I also make a title automatically via PHP for this column and appear it in bold in Excel? I mean like:




I mean the title Car which is in bold, can I automatically insert it in PHP when processing the CSV? Because now it is only the car brands which are saved...

04-24-2012, 01:53 PM
You can't do any formatting with CSV.
CSV is plain text only.

Use XML instead:

Sort of hard to explain, but you can control data (values) as well as cell formatting.

Also some PHP classes for doing Excel stuff ...

Looks sort of advanced to me.
I've never attempted it.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum