Team,
I need to extract required data from excel and upload into Orchestrator Queue.
Excel Sheet - Any number of sheets can be present in excel
Extract Data - Column AD
Operation - We need to iterate through each sheet and check whether col- AD consists data ?
If Yes we need to check which cell have data and save value to variable.
Note - AD6 or AD7 or AD8, either one will have value.
Any suggestions are welcomed.
Thanks
Sure, I’d be happy to help you with that!
Here’s how you can extract data from Excel and upload it into an Orchestrator Queue in UiPath Studio:
Excel Application Scope Activity: This activity opens an Excel workbook and provides a scope for Excel Activities. When the execution of this activity ends, the specified workbook and the Excel application are closed. To configure it:
- In the “WorkbookPath” field, enter the path of your Excel file. For example, you can enter
"C:\YourFile.xlsx"
.
Get Workbook Sheets Activity: This activity retrieves the names of all sheets in the workbook. To configure it:
- In the “Workbook” field, select your Workbook variable.
- In the “Output” > “SheetNames” field, create a variable (let’s call it “sheets”) to store the names of the sheets.
For Each Activity: This activity allows you to iterate through each sheet name retrieved from the previous step. To configure it:
- In the “For Each” field, input your variable “sheets” created in the previous step.
Read Range Activity (inside the For Each activity): This activity reads the value of an Excel range and stores it in a DataTable. To configure it:
- In the “SheetName” field, enter the current sheet name in the iteration. To do this, select your current item variable in the For Each activity.
- In the “Range” field, enter the range of cells you want to read. For example, you can enter
"AD6:AD8"
.
- In the “Output” > “DataTable” field, create a variable (let’s call it “dt”) to store the data.
For Each Row Activity (inside the For Each activity): This activity allows you to iterate through each row in the DataTable. To configure it:
- In the “For Each Row” field, input your DataTable variable “dt” created in the previous step.
Add Queue Item Activity (inside the For Each Row activity): This activity adds a new item in an Orchestrator queue. To configure it:
- In the “QueueName” field, enter the name of your queue. For example, you can enter
"YourQueueName"
.
- In the “ItemInformation” field, click Plus on the right side of the field, select “InArgument”, and enter the row value you want to add to the queue. For example, you can enter
row("AD").ToString
.
After configuring these steps, you can run the process and it will extract the data from your Excel file and upload it into your Orchestrator queue.
Is there anything else you would like assistance with?