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 / composing html table f...
Power Automate
Unanswered

composing html table formula/code correction

(0) ShareShare
ReportReport
Posted on by 2

I am trying to compose the html by the below formula, its working without error as shown in the below image, but I need more result.:

 

replace(replace(body('CreateHTMLtablesubinv'),'<table>','<table border="1" cellspacing="0" style="padding:10px;width:100%;font-style:normal;font-family:Arial;color:black;background-color: rgb(255,255,255);font-size:13px">') ,'<th>','<th style="text-align:center;color:white;background-color:rgb(46,117,182)">')

 

I need to fix the below :
a) padding not working, but I applied in the code for padding to 10px, could not understand the mistake
b) last 3 column, want to keep the data algin to right as these are currency related. not looking like this.

 

Please guide how to fix this 2 requirement :

 

image of the current result:

MIA27_0-1684303422367.png

 

Image of my flow:

MIA27_1-1684303565770.png

 

 

 

 

Categories:
I have the same question (0)
  • MIA27 Profile Picture
    2 on at

    I hope the below link method need to be used, but not sure

    https://www.w3schools.com/cssref/tryit.php?filename=trycss3_nth-child_odd_even 

     

    <style>
    p:nth-child(odd) {
    background: red;
    }

    p:nth-child(even) {
    background: lightgreen;
    }

     

     

    But how to be used in my case, how to call the align 

     

    please guide

  • MIA27 Profile Picture
    2 on at

    Any idea or any alternative, possible or not possible to achieve this requirement.

    pls guide

  • MIA27 Profile Picture
    2 on at

    Tried with third replace formula also - no error but no result

     

    replace(replace(replace(body('CreateHTMLtablesubinv'),'<table>','<table border="1" cellspacing="0" style="padding:10px;width:100%;font-style:normal;font-family:Arial;color:black;background-color: rgb(255,255,255);font-size:13px">') ,'<th>','<th style="text-align:center;color:white;background-color:rgb(46,117,182)">'), '<td>', '<td style="nth-child(1) {text-align: right;}">')

     

    any idea, possible or not? if not not no need further test

     

  • MIA27 Profile Picture
    2 on at

    I am able to fix the problem of padding by below changes, but still unable to solve the last two column align right issue

     

    replace(replace(replace(body('CreateHTMLtablesubinv'),'<table>','<table border="1" cellspacing="0" style="padding:10px;width:100%;font-style:normal;font-family:Arial;color:black;background-color: rgb(255,255,255);font-size:13px">') ,'<th>','<th style="text-align:center;color:white;background-color:rgb(46,117,182)">'), '<td>', '<td style="padding-left:5px;">')

     

     

    Please guide is it possible, if yes how and what code to add in above to acheive this.

     

     

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 442

#2
Vish WR Profile Picture

Vish WR 328

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard