I am using Python to create an excel file from a csv file. I am trying to get it to where if the data for the cell begins with a "=" then print it as a function in excel... but i'm not having any luck. I tried to perform a regex on the string to see if it starts with a "=" but it isn't working. Here is what I have so far in Python:
import xlwt
import re
string = '=HYPERLINK("http://www.google.com";"Google")'
if re.match("^=", string) == True:
formData = re.sub('=', '', string)
sheet.write(row_count,col-1, Formula("'" + formDta + "'"),style)
Is this not the right approach, or am I just have the wrong syntax? Any suggestions on how I can make this work?