How to open excel with password

The Excel Application Scope does not work.
How to open?

  • in the case the Excel edit password is only set, it can open the Excel by setting edit password in UIPath.
  • but, in the case when both edit password and open password are set, it just can’t open the Excel even when both the passwords are set in UIPath.

How to solve the problem?

Thanks in advance!
Wubin

the version of UIPath is 2021.10.5 enterprise license
the version of Excel is office364 mso(16.0.13801.21520) 32 bit

if you have read range there is property called password there you can give your workbook password as a string format

UIPath cannot open the Excel. it stop in the beginning of Excel Application Scope.

use workbook activity read range

Hi @bin.wu

As an indirect solution, if necessary in your case, you can use the Component to add or remove passwords from an Excel file.

Yes, It can read range.
Another question, how to get the sheet name of this workbook.
The sheet name will change everytime, and I need get the sheet name.
And then print the Excel to PDF.

Thanks for your idea. Yes, it works.
And I wonder if I make mistakes using Excel Application Scope, or It just doesn’t work when open-password is set in Excel by using Excel Application Scope.

use get workbook sheets activity it will give you sheets from workbook

“get workbook sheets” seems should be used under “excel application scope”,
but it doesn’t work when open-password is set in excel in my case.

We solved this problem by remove the password.

Thanks for your kindly help!!