I want to capture the field or column name that is filtered in the excel file when reading through python. I saw that we can also capture only the filtered rows by using openpyxl and using hidden == False (How to import filtered excel table into python?). In my project it is important to identify which field/column is filtered in the excel file. Is it possible? and how to achieve? Adding an example.
pip install openpyxl
from openpyxl import load_workbook
wb = load_workbook('test_filter_column.xlsx')
ws = wb['data']
This is non hidden data while if the gender column is filtered below![[![enter image description here][2]][2] this.](https://i.stack.imgur.com/kXz7J.png.)
So what I am expecting is my output should be giving gender as that is filtered. If more than one field is filtered then expecting to provide all the filtered column names.
from When reading an excel file in Python can we know which column/field is filtered

No comments:
Post a Comment