Showing results for 
Search instead for 
Did you mean: 
New Member

How to format datatable retrieved from Excel?



I have set up a flow that allows me to automatically send an email if it doesn't already exist, and if it does exist, it just responds to it.


The problem I have is that the information that I am providing as a response is just a copy/paste of Excel tables and pivot tables. Unfortunately looking through the available flows, I can't seem to find a way to store the below data exactly as-is into a variable. The closest I have gotten was using "Read From Excel Worksheet" which does grab the information but none of it contains its original formatting.





Super User
Super User

I very much doubt that you can store the information in a variable.

One thing you can try is to loop through the datatable in order to build an html structure similar to the Excel formatting.

Another thing you can try is to copy from Excel, and then through the Outlook interface paste the copied cells.

New Member

That's unfortunate.

I was hoping to try to create a loop so all this was sent out on an hourly basis, and it seemed like the Outlook flows would have made that very easy to do.

Would you happen to have a resource on how to build HTML structures for the data table?

Hi @ErikHeredia1 


For building html table you can go by two options.


1. Find out the corresponding html code for the Excel table and then modify/use that in the "Send email through Outlook" by enabling the "Body is Html" option


This link will help you to get the html of the sheet.

ExtendOffice - How to convert Excel sheet or cells to html table?


2. If you think that gets too complex then simply take a basic html structure of any table and then add data from the PAD loop accordingly.




th: Table Header

tr: Table Row

td: Table Data


So take the above html and inside the PAD loop keep on adding data.






Need to use string double quotes wherever applicable.

Once the loop ends the table will be automatically generated and then pass that string variable into the Outlook action.


This link will get you to know the structure of different html tables.

HTML Tables (


One post slightly to understand this is here.

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,149)