Subject and body of mail from excel

Hi All,

I am having one excel file where i am having subject and body of mail in Email sheet, i want to pass those into send smtp, as subject of mail and body of mail,

Can you please tell me how i can get those value in variables.
Input file.xlsx (12.5 KB)

@amruta_pawar The Header format doesn’t seem to be in the right way o access the values :sweat_smile: , Do you need the Excel Format in that way itself, and can you tell me the reason why if possible?

yeah same format it is as per requirement, can we select text from data table where item = body, like that something, as you are good in linq, but if it is not feasible will try to ask BA to change it.

->Read that excel file you will get data table
->loop that data table and check
->if condition row(Item)=“Suject” then take assign activity and store row(“Text”) into an variable and
-> check another if condition for Body same as above.


only one

@amruta_pawar if it is only one After reading the Excel into a Datatable. Try getting the values using the Datatable itself in this way, say DT is your Datatable :

DT(0)(“Text”).ToString for Subject
DT(1)(“Text”).ToString for Body


yeah this can be good idea, but can you tell me what dt(0) mean, is it row?

1 Like

thanks buddy , it will work too. :slight_smile:

@amruta_pawar DT(0)(“Text”) means that you are accessing the First row value of Text Column in that Datatable.

1 Like

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