The excel connector does not have a build in function or method that allows you to unlock an excel workbook. However, I would suggest creating a script to do so. You should be able to pass the workbook/worksheet into the script through automation and use the following method call to unprotect the worksheet:
The following link describes how to iterate through a list of worksheets through automation. What's really useful about this link is that it also shows what references should be needed to work with Excel through script.
Here is how you would do open a password protected worksheet. It is important to note that Excel must be running first for this to work. If you load an empty spreadsheet to start with that will do the trick like this.
Then open your sheet - obviously this has some hard coded values which you may choose to input using variables. Create the _ApplicationProxy1 and the workbooksProxy1 by extracting a proxy from ExcelApplication and Workbooks.
The script to provide the Missing value object is:
I was able to open a password protected excel using above reference, but how to use "GetCellValue" from a WorkbooksProxy? When I use MicrosoftExcel1-GetCellValue, its picking up from Empty.xlsx and not from PasswordTest.xslx file...
Posted: 4 years ago
Posted: 14 Feb 2018 11:35 EST
ALLAYNANDA KISHOREREDDY (ALLAYNANDAK)
senior software engineer
You found answer for above question,if found please share the answer
I was able to open a password protected excel using above reference, but how to use "GetCellValue" from a WorkbooksProxy? When I use MicrosoftExcel1-GetCellValue, its picking up from Empty.xlsx and not from PasswordTest.xslx file