How can i set default style for all cells

Topics: Developer Forum, User Forum
Feb 6, 2008 at 11:09 AM
Hello Everybody!

How can i set default style for all cells in PHPExcel?

--
Szaki
Coordinator
Feb 6, 2008 at 12:12 PM
This is currently not implemented. I'll create a work item for this.

You can use the following workaround meanwhile:
$styles = $objPHPExcel->getActiveSheet()->getStyles();
$styles'default'->getFont()->setName('Times New Roman');
Coordinator
Feb 6, 2008 at 12:13 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Feb 6, 2008 at 12:27 PM
PHPExcel_Worksheet->getDefaultStyle() now exposes the default style. (check http://www.codeplex.com/PHPExcel/SourceControl/ListDownloadableCommits.aspx for latest source)