Home > Enterprise >  Xlwings / open password protected xlsx?
Xlwings / open password protected xlsx?

Time:02-23

is there any way to open a password protected excel-sheet with xlwings? (whole xlsx is protected - that means when the excel is opened you have to put in a password to get to the excel)

If not is there any other way to protect the excel-sheet for some users - but have access with xlwings to the worksheet?

CodePudding user response:

xlwings.Book() has a password parameter:

password (str) – Password to open a protected workbook

You should just be able to

import xlwings

wb = xlwings.Book("file.xlsx", password="Passw0rd!")
  • Related