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 / 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard