I need to add Number column value as (key) & Account description column values as (value) into the dictionary from the text file. Kindly refer input text file.
Can you try to convert the txt file to csv then add the key/value pairs from the csv row by row? Where the key would be YourDictionary(row(“NUMBER”).ToString.Trim) and the value row(“ACCOUNT DESCRIPTION”)
@jamunatj , you ca use GenerateDatatable activity to create the datatable with the input of type string and then you can add it to the dictionary with the appropriate columns as a key, value pair.
I have tried the code as you mentioned in the screenshot. I got error while assigning arrSplit even through imported system.Text.RegularExpressions . Could you please guide me to move on from this. AddToDictionary.xaml (7.0 KB)
A dictionary could only hold one of those rows. You can’t put multiple rows in a dictionary. Why are you trying to convert to dictionary instead of just using the datatable?
Thanks the response, I have imported system.Text.RegularExpressions from package , still getting “Regex is not declared” error. Kindly suggest me to move further.