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 in the template for ease of access. I'm not well-versed in excel, and I am using python as a "catalyst of learning." What I'm discovering when I open a generated file is that the functions I input have '@' symbols in certain places.
In python:
from openpyxl import Workbook
wb = Workbook()
sh = wb.active
sh["A2"] = "=IF(ISERR(VLOOKUP(F1,A1:B21,2,FALSE)),”False:Not Contains”,”True: Text Found”)"
(excel function from: https://excelx.com/formula/if-cell-contains-text/#bm4)
In excel:
=@IF(ISERR(VLOOKUP(F1,A1:B21,2,FALSE)),”False:(Not) Contains”,”True: Text Found”)
I believe that this is on the excel side, as when I print the cell in python, I will get the same string that I input.
print(sh["A2"].value)
I was wondering if anyone has had experience with openpyxl to shed some light on how to go about fixing this issue.