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 / HTML Column Width Alig...
Power Automate
Answered

HTML Column Width Alignment and Formatting

(1) ShareShare
ReportReport
Posted on by 1,265
I have a Flow based on a SharePoint list.  There are (10) columns but I would like for the columns to have different alignments.  Columns 8, 9 and 10 are numeric so I would like to them the be aligned to the right (I would also like all to have two decimal places).  Regardless, I have the output working correctly but not the formatting.  I have worked with the CSS but have been unable to modify.  Is Power Automate limited in the method to format this information or are multiple alignments possible?  The current CSS information is identified at the end.  Please note that the CSS only deals with the first (3) columns (I was trying to get those to work prior to addressing all (10)
 
If possible, I would like the following...
Column 1:  Center-Align
Column 2:  Center-Align
Column 3:  Center-Align
Column 4:  Left-Align
Column 5:  Left-Align
Column 6:  Center-Align
Column 7:  Center-Align
Column 8:  Right-Align
Column 9:  Right-Align
Column 10:  Right-Align
 
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    @RJF61 Hi,
    It doesn't make too much sense for styling within Create HTML table action, before the data flow to the destination, you can try to compose the output with styling, and send it via email to check the appearance of the table.
  • David_MA Profile Picture
    14,485 Super User 2026 Season 1 on at
    Please share how your post is related to Power Automate. If you've developed a flow, share what you've done so we have a better understanding of what you are attempting to achieve. If you're just asking how to change the CSS of a SharePoint site, you will have a better chance of getting an answer in the SharePoint forums at SharePoint | Microsoft Community Hub
  • RJF61 Profile Picture
    1,265 on at
    Hello @David_MA
     
    Thanks for the response.  Following is the Flow I am using.  As shown, performing Get Items from SharePoint List.  Then creating an HTML table with the CSS previously posted.  What I am trying to accomplish is "centering" info in columns 1, 2, 3, 6 and 7.  I would like "left alignment" in columns 4 and 5 and "right alignment" in 8, 9 and 10. 
     
     
  • Verified answer
    David_MA Profile Picture
    14,485 Super User 2026 Season 1 on at
    To do what you want, I believe you'll need to manually generate the table instead of using the Create HTML table action. I am guessing the apply to each action is the data source for all of the rows. If so:
    • Create a string variable in your flow and set the default value with the start table and th tags. For example, this portion of the table:
    <table>
      <thead>
        <tr>
          <th style="text-align: center;">Header 1</th>
          <th style="text-align: center;">Header 2</th>
        </tr>
      </thead>
      <tbody>
     
    • Then in the apply to each, use an append to string action to add each of the rows. For the cells where you want the text centered or any other styling, use inline styles like below:
     
        <tr>
          <td style="text-align: center;">Centered Text 1</td>
          <td style="text-align: center;">Centered Text 2</td>
        </tr>
     
    • Finally, outside of the apply to each, add an append to string variable with the tags to close the table.
     
      </tbody>
    </table>
    Maybe someone has figured out a better way, but when I need to have precise control over the formatting of the table data, this is the method I use.
  • RJF61 Profile Picture
    1,265 on at
    Hello @
     
    This was very helpful!  Thanks.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard