Send email based on value present in Excel

I want to send an email based on a specific number found in a particular cell within excel.

i.e. - when that cell reaches 1500, send an email with that number in the email body.

Anyone came across this before and could help out?



Do you mean want to send mail if cell value is equal to 1500 or more ?

Yeah, when it reaches 1500, then 1510 and in 10 increments. Thanks,


  1. Use Read Range activity to read the data from excel file and will give output as DataTable and say ‘inputDT’

  2. And then use ForEach Row activity to iterate that DataTable.

              ForEach row in inputDT
                 if Cint(row("ColumnName").Tostring) >= 1500
                   Then send mail
                    Else Skip
  1. Read Excel using ReadRange . Get the output as DT

  2. DT.Rows.Count will Give you count of Rows in DT.

  3. Loop DT . Put a condition for sending mail in IF Condition else skip it

If You Wanted a incremental value
Increment it in If condition and code as per the logic

This doesn’t bring any errors when, I am doing this within DataScraping then Excel Application Scope, it is not sending any emails either to say the number is 1500 or above or wither it’s below the threshold.

Attached is the code Capture|479x500


  1. Did you saved output of Read Range activity also into LicenseDT variable ?

  2. you mentioned Column Name as In Use In Use. Is it correct ?

  3. Did you specified To email properly or not ?


In the Read range the Datatable variable is as LicenceDT, I’ve tried to output the figure to a txt file and also this isn’t working

In Use In Use is correct, it’s the way the data scraping pulls the data from the application, yup, email is correct format.

Now resolved, read the data table rather than using read range then produced the email.


1 Like

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