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?

Was it helpful?

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');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top