Help with initial automation - updating excel after sending emails

Hello,

I am reading an Excel sheet and then for each row in the Excel I am sending an email from Outlook. This works.

I want to update a column in Excel with the date and time after the email was sent. I am not using a data table in this automation currently as I couldn’t get it to work.

Any tips here are greatly appreciated. If you know of a recent video where this is shown can you please reply, I have some other videos from 3 and 4 years ago, but there are differences that I haven’t been able to resolve.

Cheers

@fee3f91749a34c0c00102720d

After Sending the mail in the for each excel row .Take Assign activity

CurrentRow("DateandTime")=Now.ToString("yyyy-MM-dd HH:mm:ss")

It will automatically update the rows in excel with Date and time

Hope this will help you

@fee3f91749a34c0c00102720d,

Initialize index variable in For each row activity property let’s say index. This will hold the row number being processed or iterated.

After your send email logic add one Write Cell activity to write back the status like this

image

In value just mention the date and time using Now

Thanks,
Ashok :slight_smile:

@fee3f91749a34c0c00102720d

Use Send Outlook Mail Message or Send SMTP Mail Message to send the email.
Add Excel Application Scope activity.
Configure the File Path property to point to your Excel file.
If you already know the row index, you can use it directly. Otherwise, you might need to read data from the file

  • Use the Write Cell activity to update the cell in the identified row.
  • To get the current date and time, use an Assign activity:
    currentDateTime As String = Now.ToString(“yyyy-MM-dd HH:mm:ss”)

Write Cell activity:

  • SheetName: The name of the sheet where you want to write.
  • Cell: The cell address you want to update, e.g., "B2".
  • Value: The currentDateTime variable you assigned.

This worked, many thanks

1 Like

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