Skip to content Skip to sidebar Skip to footer

Python To Close A Workbook Using Win32com

I'm using python 2.7.11 on a windows 10 machine where I'm updating a file using VBA contained in the Update_table.xls worksheet. I'm using the below code but I am finding that the

Solution 1:

Not sure what you mean by running multiple scripts at once, but to close the workbook:

wb = xl.Workbooks.Open(Filename="C:\Projects\Update_table.xlsb",ReadOnly=1)
...
wb.Close()
wb = None

Post a Comment for "Python To Close A Workbook Using Win32com"