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)

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

image

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

@koolrc812

Replace E2 with your column name

ok, @sangeethaneelavannan1
forum.zip (6.6 KB)

ok,@koolrc812
forum.zip (6.6 KB)

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

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

ok,@koolrc812


can you try below screenshot
@koolrc812

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

@koolrc812
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’.?

@koolrc812

can you change variable type array of string

cheers

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]?
image

@koolrc812

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

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

Cheers

2 Likes

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


cheers

thanks heaps

1 Like