[PHPExcel] freezePane() for iPad not working

Topics: Developer Forum
Jul 5, 2015 at 6:41 PM

I’m developing an Excel document with freezePane. I’m using the following code:


Although I’ve tried with this code too:

$objXLS->getActiveSheet()->freezePaneByColumnAndRow('X', 14);

In both cases, when I open the created file with my Excel version installed on my MAC computer (Office 365 version. I also tried running it with PC under the same version) it works correctly. But if I try to open the created file with the same version of Excel Office 365 installed on my iPad it does not work.

The iPad version also comes with the tool to freeze panes and from there we can freeze panes any way we want and the tool works correctly. What I need to achieve is to have the freeze pane tool automatically running on the position I programmed from PHPExcel when I open it with iPad the same way that it works on the coputer versions.

So I tried a few things:
  • Create an Excel document with freezePane from the software installed on MAC and not from PHP. I saved the file and I opened it from iPad and it worked correctlty.
  • Another thing that I tried was opening the PHP created file with Excel installed on MAC and without doing anything else I saved it once again from the software. But when I tried to open it with iPad, frozen panes didn’t work.
  • Lastly, again I opened the file created with PHP on Excel for MAC but this time I deleted the freeze pane option from the program and then I put it on again. I saved the document and this time when I opened it with iPad it worked.
What might be happening? It seems like the code used (PHPExcel) freezes panes in a different way from the way that the program does it when you freeze them manually and it is only read by the Exel versions for computer and not for iPad. But when you freeze panes manually from the program, then all versiones read it well, including the ones for iPad. Is there any solution to create a document with frozen panes with PHPExcel and that it will work the same way when I open it on the iPad version?

Greetings and thanks in advance.
Jul 5, 2015 at 7:00 PM
Edited Jul 5, 2015 at 7:01 PM
$objXLS->getActiveSheet()->freezePaneByColumnAndRow('X', 14);

certainly won't work..... all *byColumnAndRow() methods expect a column number (starting from zero), not a column letter

You're complaining about PHPExcel not working for Office365 on iPad, yet saying it works from Excel on Mac and on Windows correctly.... so perhaps the inconsistency is between the different platform/versions of Excel, rather than within PHPExcel..... but as I don't run Excel on iPad, I have no idea what the difference might be, and can only write the appropriate code for Microsoft's published format.... and I know that MS don't always adhere to that published standard.

Perhaps if you could provide me with an example of a file that works on Excel for iPad, I might be able to work out what part of the published format Microsoft isn't adhering to so that I can get it working with that platform/version
Jul 5, 2015 at 8:45 PM
Edited Jul 6, 2015 at 2:26 PM
Thanks for your quick response. Already I have corrected the column parameter and it is already working in this axis but not working for ipad yet.

I thought that the bug could be of PHPExcel because when i created an Excel document with freeze pane from the software installed on MAC/PC and not from PHP. I opened it from iPad and it worked correctly.

You can download 2 files excel here http://ge.tt/4NptZlJ2?c:

1) notworkingIpad.xls : created with PHPExcel and not working for ipad

2) workingipad.xls This file was created opening notworkingipad.xls on mac. taking out the frozen pane with this option:


, and puting it on again with this option:


I save it and it works on iPad.

thank you very much.