How to copy the content of an excel sheet to a mail body in Outlook / HTML file, without changing the format?
With the current list of UiPath activities and product releases, there are no inbuilt functionalities / activities in UiPath Studio for Copying the Excel sheet content to mail body/ HTML file.
A workflow would be required to be designed, by trying to create a custom activity through which the required functionality can be achieved.
The procedure to Create Custom Activity
- Write the whole custom code in C# or VB language into one Class Library project
- Make a nupkg file for the project
- Use this nupkg file as a custom activity, based on the requirement.
The key pointers on designing the workflow -
- Read the whole data to a data table using Read Range Activity
- Ceate a empty text file in which we are gonna append the Excel rows in HTML format
- Use ForEach Row activity and read in loop
- Append the rows in to the file created with HTML tags to make it look as a Table
- Repeat the same until the HTML code with the sheet present, is created
- Pass the same HTML content as the body and ensure IsBodyHtml property is checked in Send Outlook Mail Message activity.