How can i set default style for all cells

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

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

--
Szaki
Coordinator
Feb 6, 2008 at 11:12 AM
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 11:13 AM
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 11:27 AM
PHPExcel_Worksheet->getDefaultStyle() now exposes the default style. (check http://www.codeplex.com/PHPExcel/SourceControl/ListDownloadableCommits.aspx for latest source)