本文转自:https://www.rpaforum.net/threads/opening-a-password-protected-excel-workbook.470/

问:

As the title says, how would we open a password protected Excel workbook using Blue Prism?

答:

Hi Nick

The best approach (which I have used for my developments) is to duplicate the existing Open Workbook action from the MS Excel VBO and change the 'Open Workbook' code stage to include the extra Password input.

Then open up the 'Open Workbook' Code stage and amend the Code (within the Code tab) to the following:

Code:
Dim wb as Object = GetInstance(handle).Workbooks.Open(Filename:=filename, Password:=password)
name = wb.Name
wb.Activate()

You'll notice that there is a change of code within the Workbooks.Open brackets compared to the original Open Workbook Code stage. This performs the magic of opening an Excel spreadsheet and entering the password at the same time.

Try it and let me know how you get on.

答:

Was intrigued to see how this can be done without the use of code so had a go myself. Works as follows:

1) Create a new VBO for Excel and set up App Modeller to work with Excel. 
2) Create a Launch page that receives two inputs - Password and Workbook.
3) In the Launch Navigate stage, used the Workbook as the Command Line Parameter and use a Wait stage to wait for the Password pop-up to appear.
4) Use Global Send Key Events to the Application to send the password and then send an Enter "{ENTER}" to the application then wait for the pop-up to disappear. 
5) In the original Excel VBO, use the Attach to Workbook page to attach the VBO to Excel and output the handle.

Hope this helps a few people 
Rob

最新文章

  1. android px转换为dip/dp
  2. CF219D. Choosing Capital for Treeland [树形DP]
  3. Lab_4_SysOps_Monitoring_Linux_v2.5
  4. 一个十年java程序员的心得
  5. NOSQL概要
  6. [课程设计]Scrum 2.0 多鱼点餐系统开发进度(第二阶段项目构思与任务规划)
  7. redhat--nagios插件--check_traffic.sh
  8. LInux下socket编程学习笔记
  9. 【贪心+一点小思路】Zoj - 3829 Known Notation
  10. js获取星期几
  11. Python安装及开发环境配置
  12. [CSS] Transforms
  13. python的工作记录A
  14. 【LeetCode练习题】Add Two Numbers
  15. 由于抽签HT For Web ComboBox下拉框组件
  16. Ecstore安装篇-1.运行系统环境要求
  17. java 后台封装json数据学习总结(一)
  18. 杭电ACM2017--字符串统计
  19. 如何快速定位到DBGrid的某一行!!!急...
  20. linux设置时间显示格式和系统版本

热门文章

  1. 关于svn外网访问的问题-搭建成功
  2. 从零开始ant-design-vue-pro开发笔记(一)
  3. PWA 学习笔记(四)
  4. Mac录制或保存视频后如何放大?
  5. maven多仓库配置 公司仓库和阿里仓库
  6. 一个diango项目的结构
  7. MySQL 主从复制问题
  8. 表单生成器(Form Builder)之mongodb表单数据查询——关联查询
  9. 检测服务器是否开启重协商功能(用于CVE-2011-1473漏洞检测)
  10. CountDownLatch(倒计时计数器)使用说明 --并发