Yazharasan
(Yazharasan)
February 16, 2023, 1:56am
1
Hi,
I am doing the automation on sending SMTP mail. In this i have stored the receiver mailID, subject and body of the mail in the excel sheet as shown below. Since, the new update in studio does have “Add to dictionary” activity i’m not sure how to read the excel data as dictionary. I have to read column “Titles” as key of the dictionary and column “Details” as value of the dictionary using “for each” activity.
Thanks in advance, kindly help me to resolve this.
Yazh
Hey
can you try with Add to Colletion activity instead?
Regards!
Yoichi
(Yoichi)
February 16, 2023, 2:37am
3
Hi,
Is “Master” Dictionary? If it’s type is Dictionary(Of String,String) the following will work.
First, define the following before the loop
Master = New Dictionary(Of String,String)
Then, put the following expression in the ForEachRow loop
Master(row("Titles").ToString) = row("Details").ToString
OR, use just the following expression. This create dictionary from datatable directly.
Master = DT.AsEnumerable.ToDictionary(Function(r) r("Title").ToString, Function(r) r("Details").ToString)
Regards,
ppr
(Peter Preuss)
February 16, 2023, 9:06am
5
1 Like
ppr
(Peter Preuss)
February 16, 2023, 2:01pm
7
Yazharasan:
it through the below mentioned error
this is not an error. Using toString is not exposing the dictionary content / key collection content
Alternate:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum
1 Like
system
(system)
Closed
February 19, 2023, 2:12pm
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.