I am using python win32com library to read an excel file. Following is the snippet I use.
import win32com.client
excel = win32com.client.Dispatch('Excel.Application')
workbook = excel.Workbooks.Open("path.xlsm")
s=workbook.Sheets('Request')
print(str(s.Cells(10,18)).replace(" ","").lower())
workbook.Close()
On calling close, a VBA warning pops up. And the program execution stops till I press'OK'. Please help me in ignoring this warning?
I have tried excel.DisplayAlerts = False , which didn't help