Two lines of header

Topics: Developer Forum
Apr 13, 2010 at 11:59 AM

I need to show to lines in the header.

I tried :

$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('Line1<Br>Line2'.);

$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('Line1\nLine2'.);

 

$objPHPExcel->getActiveSheet()->getHeaderFooter()->setEvenHeader('Line1\nLine2'.);

Etc... but I can't find the solution.

Can anyone help me ?

 

Thanks

Real

Coordinator
Apr 15, 2010 at 7:46 AM

Try using double quotes round your string.

Standard PHP: "\n" (double quotes) is interpreted by PHP as a new line character; '\n' (single quotes) is interpreted by PHP as a \ followed by the letter n