Preserve Colour formatting of excel

Hi Team
I have a data in excel sheet in a different colour format , I want sheet as output in mail body with same colour format How i can get this?

1 Like


If you are trying to paste the excel sheet data as image in the email body then you can do it. Let us know how you are trying to put the excel in the mailbody.

Hello @Kuldeep_Pandey

  1. Load the Excel file using Microsoft.Office.Interop.Excel.
  2. Convert the Excel data to an HTML table with inline CSS for formatting.
  3. Set the HTML table as the email body.
  4. Send the email using “Send SMTP Mail Message” with the IsBodyHtml property set to True.

Thanks & Cheers!!!

Can you explain point no 2

1 Like


  1. Copy Excel data.
  2. Create an HTML table structure with <table>, <tr>, <td>, and <th> tags.
  3. Paste Excel data into the HTML table.
  4. Apply inline CSS styles (e.g., style="property: value;") for formatting.
  5. Save HTML as a file or store it as a string.
  6. Embed HTML in the email using “Send SMTP Mail Message” with IsBodyHtml set to True.
  7. Send the email.

I am not getting colours only getting sheet

Can you send xml with colours files in input


  1. Take a screenshot of the Excel sheet.
  2. Save the screenshot as an image.
  3. Compose an HTML email with the <img> tag to embed the image.
  4. Send the email using UiPath’s “Send SMTP Mail Message” with IsBodyHtml set to True.
  5. Test the email in different clients for image display.