I am trying to open a workbook using a pre-opened excel com object within a python thread. Using the below code:
from multiprocessing import Process, Queue
def open_workbook(excel,iSub_Loc,q):
p = Process(target = open_workbook_helper, args = (excel,iSub_Loc))
p.daemon = True
p.start()
def open_workbook_helper(excel,iSub_Locq,):
wb = excel.Workbooks.Open(iSub_Loc)
ws = wb.Sheets(1)
q.put((wb,ws))
but i get the following error
Can't pickle <type PyIDispatch'>: it's not found as __builtin__.PyIDispatch
any suggestions?