Explore an easy method to put Excel's sheet into the body of Outlook

Hi, everyone

There is a excel’s sheet with merged cells and color filling (example.xlsx: Sheet1). I need to preserve all the formatting and put it into the body of an Outlook email.

I’ve come up with an idea: if I could easily generate the HTML code for the desired sub-table, I could then dynamically embed it into the HTML content of the email body.

However, I’m not sure if there is a direct way to convert a sheet into HTML in the Studio Pro. If you know how to implement this or if you have another more convenient method, please let me know.

External assistance for example.xlsx:

In terms of table display, the values of cells D5 to D18 should all be ‘system1’, but in actual reference, only cell D5 has a value, with the others being empty. This is not conducive to data analysis and filtering, such as in the scenario where you are filtering for data with column D = ‘system1’ and column F = ‘OK’. Are there any data processing methods available in this case?

Version:Studio Pro 2020.4.3
image

example.xlsx (10.0 KB)

Regards,

Hi @chenyanshan_gz

Click on Add data values and then Map data value

Click on Add Value and Select Table then pass your data table variable

Regards,

Hi,

Thanks for your reply. I know that this method can display the table in the body of the email, but it can’t keep the format of the excel sheet. When reading sheet as datatable in UiPath, the color of the fill and the merged cells cannot be preserved. I’ve also used this method to display simple tables in emails. However, please note that the table I’m giving this example has a complex format here. I need to make sure it is the same in the mail as it is in excel.

Regards,