Hello all,
New UiPath user and need a little help.
I would like read the excel file above and create a text ( to be used in an email) with the following format.
Hello {Name}
Your meeting time is at {Time}
Thank you
and then send it to {Email Address}
Any help would be greatly appreciated!
shaikmdrafi
(shaik mahammad raphi)
October 22, 2020, 4:20am
2
hi @jack-keenan-clancy , please try attached xaml for prearing the mail body content.Test excel.xaml (6.6 KB)
this is html body content , you must check the isBodyHtml, PFB screen shot
New Microsoft Excel Worksheet.xlsx (8.3 KB)
Hi @jack-keenan-clancy welcome to forum
For this
First create a text file with following text
Hello Name
Your meeting time is at Time
Thank you
Read the excel field and store in dt1
Use for each row to loop through each rows of dt1
Inside it use the following
Read the text file and store in stringvariable body
use Assign activitiy to assign body varible with values of each rows from excel
body = body.Replace(“Name”, row(0).ToString). Replace (“Time”, row(1).ToString)
Then after this use mail activity like Outlook mail message activitiy or smtp to send an email with email to whom u want to.send as row(2).ToString
Hope it helps you
Regards
Nived N
Happy Automation
1 Like
Works perfectly! Thank you so much!
However, the [Time] is coming out as 12/30/1899 09:00:00 because of the excel format.
I tried to use substring to trim only (09:00), but was unable to because the [Time] isn’t a string in the first place. (also tried to change [Time] to string, but that didn’t work either)
If you have the time, do you have any ideas?
Thanks in advance!
Hi,
for you time issue instead of row(1).tostring use something like
body = body.Replace(“Name”, row(0).ToString). Replace (“Time”, Cdate(row(1).ToString).toString("dd/MM/yyyy"))
cheers
Hi @jack-keenan-clancy
Check @Shikhar_Tandon post he had explained that part
system
(system)
Closed
October 26, 2020, 4:02am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.