I have an excel workbook I need to open from python in a writable mode. The workbook is set up to have the prompt for a read only recommendation and this cannot be removed.
I am using the following:
import win32com.client
xl=win32com.client.Dispatch("Excel.Application")
filepath = 'C:\Users\FullFilePath.xlsm'
xl.Workbooks.Open(Filename=filepath, ReadOnly=False, IgnoreReadOnlyRecommended=True)
It opens the file, but it's still popping up the dialog asking if I want to open in read only. Is it possible to cancel that dialog?
Use instead:
This works without a dialog box for me.