Skip to content

How to access filter data? #763

@MrMadsea

Description

@MrMadsea

Read and complete the full issue template

Do you want to request a feature or report a bug?

  • Bug
  • Feature

Version of ClosedXML

Any

What is the current behavior?

Excel file has previous selected filter before being open by closedxml.
When looking for the Range I always get the complete excel and not the range of the selected filter.

What is the expected behavior or new feature?
Is there a way to select only the already pre selected lines by a filter like in interlop?
It would be something like this:
Range filteredRange = sheet.UsedRange.SpecialCells(XlCellType.xlCellTypeVisible);

Did this work in previous versions of our tool? Which versions?
Not sure.

Reproducibility

100%

Without a code sample, it is unlikely that your issue will get attention. Don't be lazy. Do the effort and assist the developers to reproduce your problem. Code samples should be minimal complete and verifiable. Sample spreadsheets should be attached whenever applicable. Remove sensitive information.

Code to reproduce problem:
In interlop:
It would be something like this:
Range filteredRange = sheet.UsedRange.SpecialCells(XlCellType.xlCellTypeVisible);

Can this be done in closedxml

Thanks in advance,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions