While working on a project, I wanted to use the filter function in excel in order to display things in a neat and professional fashion. Unfortunately, openpyxl (3.1.4) doesn’t support the filter function, so one has to add it to the python code like this:
example = "=_xlfn.FILTER(Index!$D$4:$D$100,Index!$F$4:$F$100="JA","")"
ws['C4']= example
When the program runs, it enters the data into the workbook…with an @
at the beginning of the formula like so:
=@FILTER(Index!$D$4:$D$100;Index!$F$4:$F$100="JA";"")
This symbol causes the filter function to only display the first instance of an item instead of displaying the entire list. Of course when one deletes the symbol everything works normally.
Of course I can manually delete it every time, but that would get annoying after a while since this program will be used quite often. How can I utilize this powerful feature in Python? Or do I need to just grin and bear it?
1