Skip to content

[F] #1363 - Add support for excluding AutoFilter columns #1383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

remzh
Copy link

@remzh remzh commented Jul 9, 2020

Summary

I brought this up in #1363 several days back. Basically, Excel allows you to exclude specific columns from showing the AutoFilter button when setting an AutoFilter range, which is extremely helpful when you want a field to span more than one column and/or with merged cells. This would implement support for that in ExcelJS.

Test plan

This implementation is intended to be as minimally invasive and non-destructive as possible - it merely adds on a property, exclude, that can be (optionally) passed onto the autoFilter property. The readme has also been updated with an example of this.

If the user opts not to use said exclude property, then autoFilter will behave exactly the same way as before.

Example:

const sheet = workbook.addWorksheet('My Sheet');

sheet.autoFilter = {
    from: 'A1', 
    to: 'E1', 
    exclude: [1, 2] // excludes columns B and C from showing the AutoFilter button
}

@remzh
Copy link
Author

remzh commented Jul 9, 2020

Additionally, there was a typo in one of the changelogs - a link referencing #306 in the changelog actually linked to #304.
9076e4d simply fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy