Format cells of excel file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dheeraja
Forum Commoner
Posts: 36
Joined: Tue Nov 09, 2010 11:03 pm

Format cells of excel file

Post by dheeraja »

Hi Guys,
I am looking for a way to format excel cells using PHP, I am exporting mysql data to excel file using below method:

Code: Select all

$fields = array("Date", "Time In", "Time Out", "Hours", "Project", "Component", "Sub-Component", "Work Done", "Supervisor Changes", PHP_EOL);
file_put_contents($filename, implode("\t", $fields), FILE_APPEND);
Now I want to make BOLD all this header fields, so please help me to this construct..

Thank you
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Format cells of excel file

Post by Celauran »

This article might be worth a look.
Post Reply