sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #17058
Re: [Question #224359]: Not able to copy text into an existing excel file using python code in sikuli
Question #224359 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/224359
sreetama posted a new comment:
[error] Error message: Traceback (most recent call last):
File "C:\Users\300177\AppData\Local\Temp\sikuli-tmp7993759016843755647.py", line 12, in
wb = copy("D:\\SAMPLE.xls")
TypeError: 'module' object is not callable
code:
dir_xlrd = "C:\\Program Files\\Sikuli X\\libs\\xlrd-0.7.2"
if not dir_xlrd in sys.path:sys.path.append(dir_xlrd)
dir_xlwt = "C:\\Program Files\\Sikuli X\\libs\\xlwt-0.7.4"
if not dir_xlwt in sys.path:sys.path.append(dir_xlwt)
dir_xlutils = "C:\\Program Files\\Sikuli X\\libs\\xlutils-1.5.2"
if not dir_xlutils in sys.path:sys.path.append(dir_xlutils)
import xlrd
import xlwt
import xlutils
from xlutils import copy
rb = xlrd.open_workbook("D:\\SAMPLE.xls",formatting_info=True)
wb = copy("D:\\SAMPLE.xls")
ws = wb.get_sheet(2)
ws.write(1,4,"I'm only changing cell A1")
wb.save("D:\\SAMPLE.xls")
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.