UIPath and XLS

Hi,
I was unable to find solution or similar case so here it is.

I created a simple sequence to automate playing my favorite game using multiple accounts basically it uses TYPE element to enter login and password and then perform several CLICK commands. As I have several accounts I copied that sequence that number of times with updating TYPE element for each account (differennt loginn and passowrd). As I store account credentials in XLS I was thinking of simplyfining this process to a sort of a loop where for each loop a separate credentials will be used.

  1. Is reading this data form XLS is best solution? Maybe UIPATH have a some sort of build in data storage? Any sugetions here?
  2. If reading from XLS is fine. What command/element to use to read XLS data? E.g. 1 set of credentials are in cell A3 (login) and B3 (pass). Then for next loop is should be +1 (A4 and B4). How to do it?

Well, given the activiy, I don’t think its so bad to store your accounts in a spreadsheets. (see How to work with Windows Credentials for other way)

Create a workflows for you Login and “Click” sequence, set either credential name or both user, password as in arguments.

In the calling workflow, first convert your xls file to xslx (get UiPathTeam.FileConverter.Activities for example: it provides a Convert XLS to XLSX activity).

Use ReadRange activity from System > Files > Workblook to convert in one activity your spreadsheet to a DataTable.

Use ForEachRow activity to iterater over your DataTable.

Inside, use InvokeWorkflowFile with the fisrt workflow and provide the login and password arguments from the row (for example row(“login”).ToString, row(“password”).ToString)

4 Likes

Thanks for suggestion, I will try this out :slight_smile: