How to create an bidimensional array

Hello i want to create a variable to store something like this:

invoice , total1, total2
0003651301, 569, 69532
0003678956, 456256, 5125
0003651301, 0, 0
0008885699, 548, 0
0003677777, 0 , 1

so after created i could use it with a for each
variable.invoice(2) = 0003651301
variable.total1(2) = 0
variable.total2(2) = 0

i try this:

but i don’t know how to create a second item

Hi @naotosx

You should probably use Data Tables to handle your data.
By simply using Generate Data Table activity you can put structure to your data. Then, you can use For Each Row activity to iterate through your Data Table and do any required operations.

Depending on your approach, you can also first use activity Build Data Table, and then activity Add Data Row that can take an array as input. It will add a row to your Data Table :slight_smile:

See attached xaml file for actual examples of the solution :slight_smile:
TestingProject.zip (3.0 KB)

I first read the text file and create a data table, then add a row to it via user input dialogs and an array of strings and then display all the values in the log of UiPath.

1 Like