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

html table formatting to team

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I am wondering how I can represent table in a better look in Teams

 

Below is what I received in the Teams. I would like to have table lines and colours in background. 

MK18_0-1651328002241.png

 

Categories:
I have the same question (1)
  • Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on at

    Hi MK18,

     

    This should help you out; 

     

    Keep your CSS script in a compose action:

    Heartholme_0-1651329463699.png

     

    Then add the output of the compose before your HTML table like this:

     

    Heartholme_3-1651329642623.png

     

     

    Output:

     

    Heartholme_2-1651329586488.png

     

    If this solved your case, please mark it as a solution.

     

    Let me know if you have any further issues.

     

    Br

    Heartholme

     

    Additional information:

     

    CSS script:

    <style>

    table{
    font-family: Arial, Helvetica, sans-serif;
    background-color: #EEEEEE;
    border-collapse:collapse;
    width: 100%;
    }

    Table td, table th {
    border: 1px solid #ddd;
    padding: 3px 3px;
    }

     

    HTML table in compose:

     

    <table>
    <tbody>
    <tr>
    <td>Equipment ID </td>
    <td>&nbsp;Numberlocation</td>
    <td>Eqiument name</td>
    <td>Due date</td>
    </tr>
    <tr>
    <td>&nbsp;Q0003</td>
    <td>QA</td>
    <td>Chroma Meter</td>
    <td>empty</td>
    </tr>
    </tbody>
    </table>
    <p>&nbsp;</p>

     

     

  • Community Power Platform Member Profile Picture
    on at

    HI @Heartholme 

     

    I did like below

     

    MK18_8-1651332603727.png

     

    MK18_2-1651332266564.png

     

    Do I need to do anything with below you posted??

     

     

    HTML table in compose:

     

    <table>
    <tbody>
    <tr>
    <td>Equipment ID </td>
    <td>&nbsp;Numberlocation</td>
    <td>Eqiument name</td>
    <td>Due date</td>
    </tr>
    <tr>
    <td>&nbsp;Q0003</td>
    <td>QA</td>
    <td>Chroma Meter</td>
    <td>empty</td>
    </tr>
    </tbody>
    </table>
    <p>&nbsp;</p>

     

    MK18_3-1651332305519.png

     

    but still showing like before

     

     

     

  • Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on at

     Sorry for the late reply. I checked the code in teams right after I posted and saw that it didn't run as intended, but had to run out for an errand.

     

    Seems like teams dosen't support CSS formatting. So we have to do all the formatting inside the HTML.

     

    If you ditch the CSS script and add a border like this it should work:

     

    <table border = "2">
    <tr>
    <td>Equipment ID </td>
    <td>&nbsp;Numberlocation</td>
    <td>Eqiument name</td>
    <td>Due date</td>
    </tr>
    <tr>
    <td>&nbsp;Q0003</td>
    <td>QA</td>
    <td>Chroma Meter</td>
    <td>empty</td>
    </tr>
    </tbody>
    </table>

     

    I didn't work out the background color but I will check some more and get back to you.

     

     

  • Verified answer
    Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on at

    @Anonymous 

     

    After a lot of back and fourth I can't get this to work. I could not find any official documentation of this but my conclusion is that teams is running HTML5 (where the command: bgcolor = "red" for example is discontinued, reference: https://www.geeksforgeeks.org/html-bgcolor-attribute/)

     

    Heartholme_0-1651345086054.png

     

    And that teams right now, does not support CSS styling (Refrence on this: https://techcommunity.microsoft.com/t5/teams-developer/styling-html-message-from-graph-in-teams/m-p/1065372)

     

    So when teams are running HTML5 which dosen't support "bgcolor" and in addition dosen't support CSS styling, it's as far as I can see impossible to add background color to your tables in teams. You can add a border (see below), and you should be able to change the text color of your text.

     

    To add a border <table border = "2"> in the start of the HTML script.

     

    Hope this was helpful.

  • lordneeko Profile Picture
    55 on at

    I've been trying to find whether there is a "User Feature Request" for this one, but I cannot find the "new" IDEAS website for Power Automate. When I click the "Feature Request" link from the home page of Power Automate, I get a page that says "Error Access Denied" pointing at https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/MPAIdeas

    Anyone know where to add ideas these days?

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard