Read Excel Columns data and pass it as variable in text file

Hi All,

I need to send email from outlook. I am passing template in body which is a text file.

I am reading data from excel file -

and want to replace the text file with values from excel file and send the email e…g

Any help will be appreciated !!!

Regards,
Zahid

Hey, you could do something like this
string.Format("Hi {0} - Company, {1} … , MyDealOwner, MyCompanyID)
You use the {} to pass the arguments in the string.

@Zahid1

  1. update your template, where you want to enter the excel data use placeholders {}. For eg Hi, {0} Company, {1}, like wise.
  2. Now read the text file and now you have a text data in string variable, let assume TemplateOutput.
  3. Use assign activity MailBody=String.Format(TemplateOutput,your excel 1st variable, 2nd variable)
    That’s all.
    Hope it helps, cheers!
1 Like

Thanks a Lot @harshit_singh & @William_Blech_Sister, it’s working fine now.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.