Skip to content Skip to sidebar Skip to footer

Excel Adding @ Signs In Openpyxl Generated Workbooks

I am currently trying to write a python script to generate a excel workbook template file from a json file. To do this I have been using openpyxl and implementing excel functions i

Solution 1:

Following the answer in: How to insert array formula in an Excel sheet with openpyxl? (thank you JvdV)

from openpyxl importWorkbookwb= Workbook()
sh = wb.active
sh["A2"] = '=IF(ISERR(VLOOKUP(F1,A1:B21,2,FALSE)),”False:Not Contains”,”True: Text Found”)'
sh.formula_attributes["A2"] = {"t": "array", "ref": "A2:A2"}

Where 't' represents type, and 'ref' is the array of cells to write the formula onto. However, I was not able to find any resources related to:

openpyxl.worksheet.worksheet.Worksheet.formula_attributes

Post a Comment for "Excel Adding @ Signs In Openpyxl Generated Workbooks"