siv_arunprakash
7 years agoContributor
How to open a password protected excel workbook in TestComplete?
I used the following JavaScript:
var Excel= Sys.OleObject("Excel.Application");
Excel.Workbooks.Open(filename, 0, false, 1, "password");
This script worked, But if I set the "password" string in a variable of type password and I pass it to function Excel.Workbooks.Open(); TestComplete doesn't decrypt the password variable.
How do I decrypt the password variable or pass it into Open function and in TestComplete docs they mention passing it using only SetText or Keys but that doesn't help in this case.
You can also do this:
Project.Variables.password.DecryptedValueThis will return the Decrypted value of your password variable.
.DecryptedValue - it's amazing! :) I am surprised why it is not documented...