I am newbie. I try to write data in existing excel file. When I run on robotframework, it display "No keyword with name 'Write To Excel File' found". So could you help me to fix my code or give me suggestion to me?
import xlwt
from xlutils.copy import copy
class Excel(object):
def __init__(self):
print "write to excel file"
def group(self,lst, n):
return ([lst[i:i+n] for i in range(0,len(lst),n)])
def write_to_excel_file(self,filename,content_list):
# Existing Excel File
w = copy(filename)
b = w.get_sheet(0)
# Create an new Excel file and add a worksheet.
#workbook = xlwt.Workbook()
#worksheet = workbook.add_sheet('wb')
#content_lists=[1,1,'hello',2,1,'brother',3,1,'how are you',4,1,'are you good today']
t=self.group(content_list,3)
#print(t)
for item in t:
b.write(int(item[0]), int(item[1]), item[2])
# close work book
w.save(filename)
w.save(filename)in the loop.