Technical Queries:Blue Prism (BP): How to Open individual excel files from folder?

Recently I saw a question online from a person whose question stated:

“I have a folder which contains individual excel files. I need to open one by one excel file and read the data from them to work queue. Please suggest me solution.”

I know there can be many solutions to this question, I am just trying to put forth one of the slutions which comes to my mind.

Assumptions:

  • Knowledge of Blue Prism Processes and Objects
  • Knowledge of BP Queues
  • Excel Reading and Loop Stages

Solution:

  • Step 1: Import the VBO Named “Utility-File Management” into Blue Prism.
  • Step 2: Open your process and drag an action stage onto the design pane.
  • Step 3: Select the Imported VBO “Utility-File Management” in the drop-down and select the action “Get Files” in the subsequent drop-down.
  • Step 4: Provide the input parameters as below


Folder–> <Provide Full Folder Path> . It can be given directly or through a variable as per your choice.
Patterns CSV –> <Provide the patterns>. Eg: “*.xlsx,*.xls,*.csv”
All wildcards are accepted here. You can use * and ? as wildcards. It’s case insensitive as well. So *.CSV is same as *.csv.

  • Step 5: Provide the output collection name in output tab.

Once done, connect it to the existing process as per need and get the results.
The output collection will have :

  1. Full Path of the File
  2. Folder
  3. Name of the file
  4. Extension of the File
  5. Created Date
  6. Last Accessed Date
  7. Last Written Date
  8. Read Only flag
  9. Bytes (size of the file)

You can use these values as you need them.
So as per the Question, next step will be to use a loop stage on this collection and build your process flow as per below diagram:

 

Should You have any questions on it, Please write an email to us by clicking on this LINK