2

I'm trying to open a write-protected ms excel 2007 file using win32com in python -- I know the password. I can open it with user input of the password into the excel dialog box. I want to be able to open the file without any user interaction. I've tried the following, but it still pops up the dialog box.

app.Workbooks.Open("filename.xls", WriteResPassword="secret")

Any ideas what I'm doing wrong please?

Thanks,

Dave.

0

1 Answer 1

3

I can get the above code to work if I don't try to use named function parameters. I.e. the following works:

app.Workbooks.Open("filename.xls", 2, True, None, None, "secret")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.