How to show header?

Topics: Developer Forum, User Forum
Oct 8, 2010 at 1:23 PM


I already know how to write a header using this command:

$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&CThis is a header');

But when the sheet is downloaded and opened the header is not visible, I have to change the sheet exhibition to "Page layout" manually.

Is there a way to change the exhibition to "Page layout" using PHPExcel??



Oct 11, 2010 at 9:46 PM

No! I don't know if Excel supports automatically opening a workbook in "print preview", but PHPExcel certainly can't do this

Sep 6, 2011 at 10:28 PM

to push this issue a little... is there any solution for this problem? Excel supports definitly opening a workbook in "print preview" (showing headers/footers).