Read excel content certain words and email

Hi, How do read an excel and recognize with certain words and send email?
eg. Excel from cell E2 to E100 if recognize with words “New York” or “LA” then will send an A template.
If recognize in cell E2 to E100 with words “Florida” or “Las Vegas” will send B template.

Do I use if and read range activities? Please help.

1 Like

Hi @koolrc812
Read range activity to store the data from excel
Inside if yourDT.AsEnumerable().Any(Function(x) x(“Column1”).ToString = DesiredValue then send template A to mail

1 Like

Hi,@koolrc812 ,
can you check below xaml file and
Main.xaml (11.2 KB)

Do you mean the below flow? anything I missed? please share screenshot flow chat. I think I missed some steps?


Document is invalid, cant open. please send again. Thanks heaps


Replace E2 with your column name

ok, @sangeethaneelavannan1 (6.6 KB)

ok,@koolrc812 (6.6 KB)

not sure why still showing document is invalid? Could you please help to share screenshot?

showing " [option strict on disallows implicit conversions from ‘string’ to ‘boolean’].
I changed = to Contains.(“New York”) but still doesnt work.


can you try below screenshot

May i please know E1_list variable type is string or System.Data.DataTable? but both doesnt work?

No @koolrc812 E1_list variable type is sytem.string

dt_countries - DataTable?
dt_countries.AsEnumerable.Select(function(x) x(“countries”).ToString).ToArray showing compiler error(s) encountered processing expression … value of type ‘1-dimensional array of String’ cannot be converted to ‘String’.?


can you change variable type array of string


this part works. Thanks heaps.
for the below part if condition not sure why it shows - compiler error(s) encountered processing expression … [Option Strict On disallows late binding]?


Did you change the type argument in for loop properties to string?

Change that and it should solve that issue…hope this helps



ok @koolrc812
change loop type in string and its work fine.


thanks heaps

1 Like