Bramastic
Bramastic

Reputation: 399

PHPExcel freezePane() makes it impossible to scroll horizontally if columns doesn't fit the window

I need to freeze first six rows and "infinite" columns which I want to scroll through but all I can do with PHPExcel class is scroll columns after the selected cell and rows below it.

The function is doing what you would achieve in MS Excel by selecting a cell (let's say T7) and clicking View->Freeze Panes.

What I need can be achieved in MS Excel by selecting a row 7 (not the cell but complete row on the left "ruler") and click View->Freeze Panes. By doing that you have first 6 rows frozen and you can scroll vertically but more importantly, since infinite columns doesn't fit the secreen, you can still scroll horizontally.

Any ideas?

Docs aren't helpful:

Upvotes: 2

Views: 2951

Answers (2)

Maurice Le Olavarriet
Maurice Le Olavarriet

Reputation: 11

It seems that only need to call the first column and the second row.

Like this $objPHPExcel->getActiveSheet()->freezePane("A2");

This will freeze the first row and let you scroll horizontally.

Upvotes: 0

Bramastic
Bramastic

Reputation: 399

$objPHPExcel->getActiveSheet()->freezePane("A7");

Credits for this answer goes to @MarkBaker: Source

Upvotes: 2

Related Questions