Question

How do I set the font size for the title in my reprot in PHPExcel?

I tried the code below, but it did't work:

$objPHPExcel->getActiveSheet()->getHeaderFooter()
         ->setOddHeader('&C&HINTERVIEW WORKSHEET')->getFont()->setSize(25);

What's the correct way to achieve this?

Était-ce utile?

La solution

See section 4.6.13 of the developer documentation, entitled "Setting the print header and footer of a worksheet".... there's a table of codes there.

Setting font size is listed in those codes, & followed by the point size.

$objPHPExcel->getActiveSheet()->getHeaderFooter()
    ->setOddHeader('&C&H&25INTERVIEW WORKSHEET');
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top