How can we create a Dictionary, which can be stored multiple string arrays for a particular key?

I am trying to read an excel sheet with attributes Driver, Claimed Type, and Claimed year. I am trying to create a dictionary that takes the name as the key and all the claimed details regarding a particular driver should be in the value part. Could someone help me out with the implementing, storing, and retrieving of the data.

Hi @Kasun_C_Siriwardhana

I think u can intialise a dictionary like this

Key : String

Value : String array

dict_1 = New Dictionary (Of String, String)

Then use read range activitiy to read the excel file and store in dt1

Then use for each row to loop through rows of dt1

Create a variable list_1 of datatype string
Inside the assign as below

list_1= {row(“Claimed Type”).ToString, row("“Claimed Year”).ToString}

Now use the Assign activitiy as below

dict_1(row(“Driver”).ToString)= list_1

By this way u can store excel data in dictionary

After this u can use for each loop to loop through dictionary.

Try this way

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

1 Like

Thanks a lot for your prompt reply @NIVED_NAMBIAR.
I already tried this approach, the issue is in my case I need to store multiple string arrays corresponding to each key.
Something like
dict_1 = New Dictionary (Of String, New List(Of String()).

But here value is array of string actually which is denoted by String in the above answer