setting Font Problem

Topics: Developer Forum
Jul 20, 2012 at 9:59 AM

Hi everyone,


I'm working on a script which create a excel file from data.

I've got to set some lines in bold and some other font specifications.

My problem is : it's not working. 


I don't really understand the philosophy of this API. Sometime code like the following work, and sometimes, doesn't. I don't understand why. I don't know exactly if the order of these kind of line have an importance or not.

Plz can you help me ? 

$sheet->getStyle($caseDebutTotalExploit)->getFont()->applyFromArray(array(                               'bold' => true,

    'name' => 'Arial',

    'size' => 10));

$sheet->duplicateStyle($sheet->getStyle($caseDebutTotalExploit), $caseDebutTotalExploit . ":" . $caseFinTotalExploit);


This code is written right after the content of the cells.

Jul 21, 2012 at 12:06 PM

Please provide a more specific example. This works for lots of people, so if there's something wrong with it I need a specific repeatable example that I can test to identify any problem.