Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

composing html table formula/code correction

(0) ShareShare
ReportReport
Posted on by

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

 

 

 

 

  • MIA27 Profile Picture
    on at
    Re: composing html table formula/code correction

    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.

     

     

  • MIA27 Profile Picture
    on at
    Re: composing html table formula/code correction

    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
    on at
    Re: composing html table formula/code correction

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

    pls guide

  • MIA27 Profile Picture
    on at
    Re: composing html table formula/code correction

    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

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492