hi, i am a beginner in uipath. i have a table containing end dates. i have to identify dates which has exceeded more than 60 days and send an email as a reminder. i have completed identifying dates which has exceeded more than 60 days, i am trying to figure out how to send that identified dates together with its whole row through email(outlook or smtp)? here is the sample of the table? sample .xlsx (11.6 KB)
- Use Excel Application Score then Read Range activity to read the whole Excel file into a Data Table
- Use For Each Row activity to loop through it
- Compare your date in an if statement, if it passes your condition then
- For example, create new Excel table, or convert your row to a string
- Use Send Email activities to send the row
hi sir thanks for your response. i have completed identifying the dates which has exceeded 60 days, i am trying to figure out how to use the send email activity to send that identified date together with its whole row.
How do you check for the date if exceeded?
CINT((DateTime.Now - Datetime.ParseExact(row("Start Date ").ToString,“MM/dd/yyyy hh:mm:ss”, System.Globalization.CultureInfo.InvariantCulture)).TotalDays)
Can you send a link on how to learn more about this syntax writing
Thanks in advance
CompareDates.xaml (7.3 KB)
Try something like this
In this expression i use CINT to round off the number.
DateTime.Now to get the current Date
DateTIme.ParseExtract(row("Start Date ").ToString,"MM/dd/yyyy hh:mm:ss, System.Globalization.CultureInfo.InvariantCulture) to parse the value of the Row(“Start Date”) to a date time.
After that i used TotalDays to get the Date difference between two days.
I really don’t know every method myself but i google alot. Hope it helps
thank you. but while the date comparison works…the email automation does not seem to work. the whole row of the date which has exceeded 60 days has to be sent through email.
hello, actually I have problem to assign a specific column to send the email. The column only contains messages. So, what variable I need to assign?
i’m not sure about this error.
I used String.join(",",Row.itemArray) to get whole row
its turned out to be like this
Don’t know what you are doing, the expression is to turn DataRow to a String.
EXAMPLE.xaml (23.2 KB)
- i tried to read the column from multiple spreadsheet.
- After that, from this spreadsheet, i want to send the email with a column (email)
My uipath cant read the content of the cell.
Can you share the xlsx file?
If i understood correctly, you want to read email from “Maintenance” sheet, and send the body?
- From Maintenance sheet,
- Have a column (Body)
- From this Body, I want to send to multiple recipients that’s why I build a data table. Actually, i want to fill up with multiple recepients.
- To start with, open the source Excel file and access the right Excel worksheet.
- Then select the cells which you want to send as an Outlook email.
- Next press “Ctrl + C” key shortcuts to copy the selected cells.
- After that, launch your Outlook application.
- Subsequently, click on the “New Email” button in the “Home” ribbon to create a new Outlook email.
- Later in the new Message window, click into the message body section.
- And then press “Ctrl + V” key buttons to paste the previously copied selected Excel cells.
- Lastly, you can compose the email as usual and click “Send” button to send it out
I too used the same way.