1

I have a password protected Excel (.xlsx) file that I want to open using Python. I tried below package and code to open it:

xlwb = xlApp.Workbooks.Open("filename.xlsx", False, True, None, "Password")

but it throws me below error:

com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft Excel', "Sorry, we couldn't find filename.xlsx. Is it possible it was moved, renamed or deleted?", 'xlmain11.chm', 0, -2146827284), None)

Although the file is located in that directory. Could anyone help regarding how to open the password protected Excel file using Python?

Kraay89
  • 919
  • 1
  • 7
  • 19
  • Welcome @Udit Prakash, look at [How to open a password protected excel file using python?](https://stackoverflow.com/questions/19450837/how-to-open-a-password-protected-excel-file-using-python) – Aviv Yaniv Aug 28 '20 at 09:33
  • 1
    Excel.Application requires the full path; same with Word.Application. –  Aug 28 '20 at 09:38
  • Does this answer your question? [How to open a password protected excel file using python?](https://stackoverflow.com/questions/19450837/how-to-open-a-password-protected-excel-file-using-python) – Svirin Aug 28 '20 at 09:45

0 Answers0