Initialize Dictionary (of string, string) without AddToDictionary

Hello,

I’m looking for the best way to converte my 2 columns Excel range into a dictionary(string, string).
The first column of my range only contain unique string for each row.
I have a old version of Uipath, so a solution with only basic activities is a must.

Also I don’t know how to declare a dictionary with dynamic size. (depending of the number of row of my excel)

@hubert_leleu

you can use Assign My_Dict= new dictionary(of String,String) for the initialization of Dictionary.

@hubert_leleu

use for loop for adding the data from Excel to Dictionary.

Can you give me more detail please ? I don’t know how to set my key and the value at the same time inside a loop

thanks for that, it was easier of what I expected for this part

@hubert_leleu

Refer the xml →
Main.xaml (12.4 KB)

thanks for your help, sadly my Uipath is too old to open the last activity of your file. I can’t update because of shitty company policy.
can you please describe it in a comment ?

@hubert_leleu

Refer->


image

1 Like

perfect, thanks a lot.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.