Hello all,
I would like to have a row of Excel data available to call as variables for my automations.
array[0], array[1], etc..
I have searched but can’t find this specific scenario. Any help would be greatly appreciated.
Thanks in advance.
Hello all,
I would like to have a row of Excel data available to call as variables for my automations.
array[0], array[1], etc..
I have searched but can’t find this specific scenario. Any help would be greatly appreciated.
Thanks in advance.
Your requirement is not clear.
Rephrase it or add explanatory screenshots.
As an example, I want UiPath to read A1:A10 into an array with a variable named “array”.
The expected outcome would be a variable (array) with 10 variations
array[0]
array[1]
array[2]…
Hope this helps.
Are you sure that you need the array data type?
The Read Range activity provides by default the DataTable output.
Example:
Hi @dhtguru
If you read the Excel file to a Datatable you are able to iterate the content in a For Each Row in Data Table activity, but you can also navigate the entire datatable based on index for example.
Here you can simply define the index of the row you would like to access (remember index starts with 0), followed up with the name of the Column you would like to read.
dt_ExcelData(index)("NameOfColumn").ToString
Regards
Soren
Thanks Yoichi,
Just a couple of questions. Your example lists all of the values captured in the column how would I reference/call a specific cell?
Also, since I need it for a row and not a columnm I unsuccessfully tried it with the Read Row Workbook activity.
I am getting the error message in the Assign activity “Value cannot be null (Parameter source)”
Thanks for the response.
Coud I trouble you to send the zip file with the xaml, project, and data file please?
Give index number relative to startingCell.
If startingCell is A3, arrObj(0) returns value A3, arrObj(1) retuns value of A4.
I am getting the error message in the Assign activity “Value cannot be null (Parameter source)”
Can you check if “res” is set in Result property?
Regards,
Hi @dhtguru
You can download the files here:
Regards
Soren
Perfect! Perfect! Many thanks Sir!