0

When writing formulas into cells, I have come across the problem of "@" being inserted in front of the =FILTER() excel formula. The openpyxl documentation states some formulas need to be prefixed with "_xlfn.". So I went ahead and tried that but I'm still seeing issues with the =FILTER() excel formula in particular. I tested "_xlfn." with other formulas such as =CONCAT() and it works just fine. Is this because =FILTER() is an array formula? I have no idea how to diagnose, please help!!

my code: ws['E3'] = '=_xlfn.FILTER(D2:AA1000,A2:A1000=A3,"")'

excel formula result: =@FILTER(D2:AA1000,A2:A1000=A3,"")

bigal32
  • 9
  • 1
  • https://stackoverflow.com/questions/66008301/symbol-appearing-after-inserting-if-formula-into-excel-using-openpyxl – BigBen Nov 05 '21 at 17:01
  • Note [this comment](https://stackoverflow.com/questions/66008301/symbol-appearing-after-inserting-if-formula-into-excel-using-openpyxl#comment116712216_66010728) too. – BigBen Nov 05 '21 at 17:02
  • Thanks @BigBen I think I've got it working now. Just needed a veteran to point me in the right direction. – bigal32 Nov 05 '21 at 21:07

0 Answers0