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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding borders to a table
Power Automate
Answered

Adding borders to a table

(2) ShareShare
ReportReport
Posted on by 280

Hi All,

 

I'm using the "Create HTML table" action, which is being populated with data from an Array. The HTML table is then dropped into a "Send an Email ((v2)" action. The content of the both the e-mail and table is fine.... BUT: the table itself is not shown. I see my text in virtual columns, but I would love to see the borders of each cell in the table... as this make reading the lines easier etc....

 

Is there a way to get this done?

 

Thanks

Regards

Charles

 

Categories:
I have the same question (0)
  • Jay-Encodian Profile Picture
    2,920 on at

    Hi @Charles-v-D 

    It's fairly simple, you can use the replace function to change the HTML string generated by the 'Create HTML Table' action:

    1.png

    Expression: replace(body('Create_HTML_table'),'<table>','<table border="1">')

    Example output:

    4.pngHTH

    Jay

    -------------------------------------------------------------------------

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Charles-v-D 

     

    Yes. You can refer to the screenshot below for the same: 

    dd.PNG

    Code: 

    <head>
    <style>
    table {
     font-family: arial, sans-serif;
     border-collapse: collapse;
     width: 100%;
    }
    
    td, th {
     border: 1px solid #dddddd;
     text-align: left;
     padding: 8px;
    }
    
    tr:nth-child(even) {
     background-color: #dddddd;
    }
    </style>
    </head>

    Output: 

    d4.PNG

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Charles-v-D Profile Picture
    280 on at

    Hi @yashag2255 

     

    Thanks for the quick turnaround! I have made an e-mail action exactly like yours but I simply get the whole code as plain text in the e-mail with the border-less table at the end... what am I doing wrong?

     

    Regards

    Charles

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Charles-v-D 

     

    Can you share a screenshot of your email action? On that can you check what action you are using and if you have enabled the code editor on the action? 

     

    de3.PNG

     

    Click the icon to enter code mode. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Charles-v-D Profile Picture
    280 on at

    @Jay-Encodian  thanks for your help on this. I was able to solve the problem using @yashag2255 approach already... thanks anyway!

  • Charles-v-D Profile Picture
    280 on at

    @yashag2255 the suggestion to put it into code mode solved it! Thanks!!

     

    Additionally. Can you provide coding example on how to set the letter-type and letter-size to Calibri 10 ??

     

    Thanks

     

    Regards

    Charles

     

     

  • Cradle2theGabe Profile Picture
    8 on at

    Beautiful! Thanks for the simple solution!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 458

#2
Vish WR Profile Picture

Vish WR 345

#3
David_MA Profile Picture

David_MA 261 Super User 2026 Season 1

Last 30 days Overall leaderboard