Skip to content

How to freeze rows/ auto filter when rows are dynamically shifted? #20

@Zinc77

Description

@Zinc77

Hello,

I’m using FastExcelTemplator and I have a question about how to handle freeze panes and auto filters when the rows are dynamically shifted depending on the data.

In my case, I cannot set freeze rows or auto filters directly in the Excel template because the starting row of the data may vary. If I do so in the template, there might be a row shift, so the freeze or auto filter ends up in the wrong position like this :

Image

So I tried to apply them programmatically like this:

// example
$templatorSheet->sheetWriter->setFreeze(4, 1);
$templatorSheet->sheetWriter->setAutoFilter(3);

The setAutoFilter() method works correctly, but setFreeze() seems to have no effect.

Is there a recommended way to dynamically freeze rows, or am I missing something?

Thanks in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions