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 / Add Array Column Heade...
Power Automate
Answered

Add Array Column Headers to value array post Office Scripts return to Create HTML table

(0) ShareShare
ReportReport
Posted on by

Hello,

 

Have a Power Automate Flow that runs an Office Scripts to filter two sets of conditions within a 2000 row Excel spreadsheet, which returns about 10 rows. 

 

Is there anyway to either add Column Headers within the Office Script or within Power Automate so that I can run the Create HTML from table function? The column headers are fixed. 

 

Any help appreciated 

Categories:
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    Hi,

     

    There are a couple of ways, and I will assume that you have an array from Excel.

     

    1. If you dont care of the order of items IN the array, you can just add the headers to the current array. If its NOT an array, first convert it to an array, then append to array a new row with headers. Then use a compose and reverse function which will put your headers first, since it was last.

     

    2. You could create an array and put in your headers. Then use an Apply to each on the EXcel Array and append to array (taking the current Excel Item and adding it to the header Array)

     

    3. You could use Join Action as well to combine them together 



    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • David_Howarth Profile Picture
    on at

    Thanks Michael for the three solutions and the second one was pitch-perfect. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard