excel access denied with win32 python pywin32
问题 My code is #Opens template for creating final report excel = win32.dynamic.Dispatch('Excel.Application') template = os.path.abspath((folderpath+'\Poop.xlsx')) wb = excel.Workbooks.Open(template) freshws= wb.Sheets("Fresh") #Sheet names must match perfectly secws= wb.Sheets("sec") cur.execute("Select * from FIRALL") freshdata=list(cur.fetchall()) #writes to the first sheet datarowlen=0 for i,a in enumerate(freshdata): datarowlen = len(a) for j,b in enumerate(a): freshws.Cells(i+1,j+1).Value =