Thanks for the reply!
I have tried it two different way
1) getting error
I have tried it two different way
1) getting error
def writeexcel(sheet_name,to,col,data) ws = self.wb[sheet_name] #calling sheet by sheet_name #TypeError: 'NoneType' object is not subscriptable ws = self.active #AttributeError:'NoneType' object has no attribute active2)second method not getting any error but it's not writing in to excel
def writeexcel(self,wkb,sheet_name,to,col,data): print(wkb[sheet_name]) #<Worksheet 'sheet1'> ws =wkb[sheet_name] ws = wkb.active ws[’A1] = 'abc’This method able to run without any error, but writing not happening