Raja.G
(Mr.RPABot)
September 9, 2024, 2:16pm
1
Hi Team,
I have one data table , i want to append data table data to key and value in the body of outlook.
I have this below datatable:
Note: This data table details is not static , whatever data found in excel should append in body key and value.
Please help me anyone for this.
Input:
Email Body:
Hi Team,
Invoice Number: 12345
Invoice Date: 2024-03-25
Currency: EUR
Expected output:
Invoice Number: 12345
Invoice Date: 2024-03-25
Currency: EUR
xxx:235.23
yyy:1586.67
rrr:123
Regards,
Raja G
lrtetala
(Lakshman Reddy)
September 9, 2024, 5:14pm
2
Hi @Raja.G
Can you try below
Sequence13.xaml (20.3 KB)
Regards,
1 Like
SorenB
September 9, 2024, 6:19pm
3
Hello @Raja.G
You can use the activity “Output Data Table as Text” to quickly and easy convert a dynamic datatable to text, that you can then append to your mail body.
Best regards,
Soren
1 Like
Raja.G
(Mr.RPABot)
September 10, 2024, 6:09am
4
Hi @SorenB ,
Yes its working ,but while I convert string outlook body print below,
Invoice Number: 12345
Invoice Date: 2024-03-25
Currency: EUR
xxx:235.23 yyy:1586.67 rrr:123
I want print below,
Invoice Number: 12345
Invoice Date: 2024-03-25
Currency: EUR
xxx:235.23
yyy:1586.67
rrr:123
Please help me for this.
Regards,
Raja G
SorenB
September 10, 2024, 6:31am
5
Hello @Raja.G
Can you please try this on your exported string from the “Output Data Table as Text”:
str_DataTableAsText.Replace(" ",vbNewLine)
Regards,
Soren
Raja.G
(Mr.RPABot)
September 10, 2024, 7:10am
6
Hi @SorenB ,
This space split it wont work because
data coming also this format as well, like
xxx kkk:235.23
yyy mmm:1586.67
rrr nnn:123
so xxx kkk this data also split
Regards,
Raja G
Hi, try this :
emailBody = “Hi Team,” + Environment.NewLine + _
“Invoice Number: 12345” + Environment.NewLine + _
“Invoice Date: 2024-03-25” + Environment.NewLine + _
“Currency: EUR” + Environment.NewLine + Environment.NewLine
For Each row in dataTable.Rows
emailBody = emailBody + row(“Description”).ToString + ": " + row(“Amount”).ToString + Environment.NewLine
Next
1 Like
system
(system)
Closed
September 13, 2024, 8:21am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.