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

Community site session details

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

Power Automate How to aligh different columns differently in Creat HTML table

(0) ShareShare
ReportReport
Posted on by

Dear Friends,

I have created a HTML table from power automate.

Next thing i need to align certain columns as left and certain as right.

Is there a way to solve this.

Thanks and Regards

 

Subodh

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    HI @Subodh-Gupta ,

     

    Please try

     

    replace(
     replace(
     YourHTMLTable,
     '<td>LeftColumn</td>',
     '<td style="text-align: left;">LeftColumn</td>'
     ),
     '<td>RightColumn</td>',
     '<td style="text-align: right;">RightColumn</td>'
    )

     

    Best Regards,

    Bof

  • Subodh-Gupta Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Dear Bof,

    Thank you for the support,

    Can you tell me where i need to put this. Its a create HTML table in power automate and after creating this i have a process for formatting this HTML table which code is . Kindly let me know how it will work

     

     

    <style>

    table, th, td {
    border: 1px solid white;
    text-align: center;
    border-collapse: collapse;
    }

    td {
    background-color: #C0C0C0;
    }

    th {
    background: #000000;
    }


    td {
    font-size: 10px;
    color: #000000;
    }

    th {
    font-size: 12px;
    color: white;
    }

    td{
    '<td>AMOUNT</td>',
    '<td style="text-align: right;">AMOUNT</td>'
    }

    </style>

  • Subodh-Gupta Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Dear All,

     

    Below is the code i am using.. I want to align right for the data in 6th Column, both for header and actual cell data

     

    <style>

    th {
    border: 1px solid white;
    text-align: center;
    border-collapse: collapse;
    background: blue;
    font-size: 12px;
    color: white;
    }

    td {
    border: 1px solid white;
    font-size: 10px;

    }

    table td:nth-child(6) {text-align: right;}

    </style>

  • v-bofeng-msft Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Hi @Subodh-Gupta ,

     

    Please try:

     

    replace( replace(body('Create_HTML_table'), '<td>LeftColumn</td>', '<td style="text-align: left;">LeftColumn</td>' ), '<td>RightColumn</td>', '<td style="text-align: right;">RightColumn</td>' )

    vbofengmsft_0-1715734741847.png

     

     

    Best Regards,

    Bof

  • Subodh-Gupta Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Dear Bof,

    I tried in the format HTML table with following code but still its not working

    SubodhGupta_0-1715743724777.png

     

     

     

    <style>

    table, th, td {
    border: 1px solid white;
    text-align: center;
    border-collapse: collapse;
    }

    td {
    background-color: #C0C0C0;
    font-size: 10px;
    color: #000000;
    }

    th {
    background: #000000;
    font-size: 12px;
    color: white;
    }



    replace(
    replace(
    table,
    '<td>AMOUNT</td>',
    '<td style="text-align: right;">AMOUNT</td>'
    ),
    '<td>PANEL-NAME</td>',
    '<td style="text-align: left;">PANEL-NAME</td>'
    )

    </style>

  • v-bofeng-msft Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Hi @Subodh-Gupta ,

     

    Please copy and past this code :

     

    <style>

    table, th, td {
    border: 1px solid white;
    text-align: center;
    border-collapse: collapse;
    }

    td {
    background-color: #C0C0C0;
    font-size: 10px;
    color: #000000;
    }

    th {
    background: #000000;
    font-size: 12px;
    color: white;
    }



    @{replace(
    replace(
    body('Create_HTML_table'),
    '<td>AMOUNT</td>',
    '<td style="text-align: right;">AMOUNT</td>'
    ),
    '<td>PANEL-NAME</td>',
    '<td style="text-align: left;">PANEL-NAME</td>'
    )}

    </style>

     

    Best Regards,

    Bof

     

     

  • Subodh-Gupta Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Thanks Bof,

    I tried this, please see below pic Still the output is same..

     

    SubodhGupta_0-1715747850538.png

    SubodhGupta_1-1715747914170.png

     

  • Subodh-Gupta Profile Picture
    on at
    Re: Power Automate How to aligh different columns differently in Creat HTML table

    Dear Friends,

    To be more clear I am attaching the style code I am using and also the output

    <style>
    table, th, td {
    border: 1px solid white;
    text-align: center;
    border-collapse: collapse;
    }
    td {
    background-color: #C0C0C0;
    font-size: 10px;
    color: #000000;
    }
    th {
    background: #000000;
    font-size: 12px;
    color: white;
    }
    </style>

     

    The Output I am getting is as below and i want Amount column values to be Right Align.

    Please help

    SubodhGupta_0-1716185499269.png

     

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard