Skip to content

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.

@WeslleyDeSouza
Copy link

any update on this?

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.

3 participants