web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to format datatabl...
Power Automate
Unanswered

How to format datatable retrieved from Excel?

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

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.

 

 

 

Capture.PNG

I have the same question (0)
  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    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.

  • ErikHeredia1 Profile Picture
    2 on at

    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?

  • VJR Profile Picture
    7,635 on at

    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.

     

    VJR_0-1647659227570.png

     

    th: Table Header

    tr: Table Row

    td: Table Data

     

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

     

    Examples:

    <th>%ColumnHeader1%</th>

    <tr>
    <td>%LoopValue1%</td>
    </tr>

     

    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 (w3schools.com)

     

    One post slightly to understand this is here.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard