i'm trying to write a formula to a series of cells by building the string. for instance i want to display the word "true" in a cell if the corresponding cell in column G contains the word "monkey" in it.
for rowi in range(totalRows):
thisRow = str(rowi)
functionString = r'IF(ISNUMBER(SEARCH("monkey",G'+thisRow+')),("true")
this will produce the string "IF(ISNUMBER(SEARCH("monkey",G1)),("true")" -- if i then pass that to xlwt.Formula...
ws.write(rowi+1, 0, xlwt.Formula(functionString))
i get this error...
File "C:\Python27\Lib\site-packages\xlwt\ExcelFormula.py", line 22, in __init__
raise ExcelFormulaParser.FormulaParseException, "can't parse formula " + s
xlwt.ExcelFormulaParser.FormulaParseException: can't parse formula IF(ISNUMBER(SEARCH("bitmap",G2)),("true")
is it possible to use this type of function with xlwt?