I am working on a lab with UiPath and I am having an issue with one particular part. I am using an Excel filing, going through each row and adding specific rows to a new excel file. I need to send this new Excel file (which is created during the run) as an attach in an email. What is the best way to do this? Since my new Excel sheet is created above, I am having a hard time referencing it again in order to send it. I also don’t know which of the many email activates to use. I am new to UiPath and any assistance, tips, or advice is greatly appreciated. Thank you all!
Use Excel Application Scope to create the new Excel file.
Perform operations to populate the Excel file.
Store the file path of the new Excel file in a variable.
** Example: **
** Assign → filePath = “C:\Path\to\your\file.xlsx”**
Use the Send Outlook Mail Message or Send SMTP Mail Message activity to send the email.
** Fill in the required email details (To, Subject, Body, etc.).**
Add an attachment to the email:
Attach the file using the ‘Attach Files’ property of the email activity.
Set the value of ‘Attach Files’ to the variable storing the file path.
Read and Process Excel:
Use the Excel Application Scope activity to read the data from your original Excel file.
Add activities within the scope to process the data.
1.Create and Save New Excel File:
Use the Write Range activity to create and save the new Excel file.
Specify the range and the path where you want to save the file.
2.Send Email:
Use the Send Outlook Mail Message(smtp- mail.outlook.com , SMTP port-587)
(or)
Send SMTP Mail Message activity(server-smtp.gmail.com, port- 465 ).
Configure the email details like “To,” “Subject,” and “Body.”
3.Attach the Excel File:
locate the “Attachments” property.
Use the full path to the newly created Excel file.