0

I insert multi line header using phpspreadsheet. Then, I save as xlsx file. I use convertapi to convert the xlsx file to pdf. In pdf, only header line one only aligned to center.

$spreadsheet->getActiveSheet()->getHeaderFooter()->
setOddHeader('&C&BFirstLine
             SecondLine
             ThirdLine');

How to make three lines also aligned to center? Thanks in advance.

Premlatha
  • 1,676
  • 2
  • 20
  • 40

1 Answers1

3

Enter after every line of header without space. It could display header in three lines and all three lines aligned to center. The &C&B(center and bold formatting) worked for three lines perfectly.

  $spreadsheet->getActiveSheet()->getHeaderFooter()->setOddHeader('&C&BFirstLine
  SecondLine
  ThirdLine');
Premlatha
  • 1,676
  • 2
  • 20
  • 40