We\'re getting an Excel file from a client that has open protection and Write Reserve protection turned on. I want to remove the protection so I can open the Excel file wit
This function works for me
def Remove_password_xlsx(filename, pw_str): xcl = win32com.client.Dispatch("Excel.Application") wb = xcl.Workbooks.Open(filename, False, False, None, pw_str) xcl.DisplayAlerts = False wb.SaveAs(filename, None, '', '') xcl.Quit()