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 / How to add row to tabl...
Power Automate
Answered

How to add row to table when excel file is dynamically created in previous step

(2) ShareShare
ReportReport
Posted on by 80
In my flow,
  • a list of team members is generated
  • Get file content grabs an Excel template
  • A new Excel file is created in the teams Documents folder based on the excel template
    • The new file IS DIFFERENT EVERY TIME. Each new file has a different file name based on time stamp. I CANNOT REUSE A SINGLE EXISTING EXCEL FILE due to business requirements (generate a new list of team members each time)
  • Compose the list of team members
What I'm trying to is write the output of the compose to the new Excel file, which I obviously can't do because Add a row into a table requires a static input, and I'm creating a new Excel file each time this flow is run. 
 
Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at
    You might want to take a look at running an Office Script from Power Automate.  You can create a table from a script.
     
    Please let me know if you need more help.
     
     
    Scott
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Take a look at the first half of this video from Reza Dorrani. He walks through how to create an array of rows using a Data Select and then inputs those into a dynamically created Excel File.  Power Automate Export to Excel | Dynamically create Table, Columns & Add Rows to Excel | Send Email

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,454 Super User 2025 Season 2 on at
     
    3 ways
     
    1. Assume the file you created already had a Table when you created it. Then you will simply have to type in the Table name, it will not be a property. Then you will set the DateTimeFormat
     
    Click out of that action and save.
     
    Now you will see *Row, you will need to insert a JSON structure
    {
       "ColumnName": Value <==number,
       "ColumnName2": "Value" <= string
    }
     
    And it will dynamically Map the data into the new way
     
     
    2. let's say you have NO table existing. You will need to use the Create Table Excel Action to define the table
     
    like this, when you do, you can use the Dyamic Property Table Name from the Create Action and then in our Add a row, it will see the table definition and you will populate as regulard
     
    3. Technically the Graph API, but you don't need it the previous options are better
     
     
    As this answers the question, I'd appreciate if you Marked it as such and maybe a like :-)
     
    If you have further questions after, feel free to at me :-)
  • tpcolson Profile Picture
    80 on at
     
    Doesn't quite work, allthough no error message is given. It's creating the excel file properly but will not write to it. 
     
     
     
     
    Gets to 100 failed on apply to each then flow fails (there are 3500 users in the team). No error message is shown. 
     
  • Michael E. Gernaey Profile Picture
    53,454 Super User 2025 Season 2 on at
     
    I am about to a movie, i promise I will get back to you tonight.
     
    Is it possible that you can share a (feel free to DM me) a copy of the file.
     
    Feel free to change the data out I just want to solve it for your issue directly.
     
    I am also wondering, if you wait a bit if the cache catches up and you see the data. If it didn't error at all, it should be there, but i promise ill write you up an example when i get back.
     
     
  • tpcolson Profile Picture
    80 on at
    @Michael E. Gernaey the data is coming from a Teams Membership roster, which I can't share, and the template excel file is, which DOES get created properly (and with a table1 defined). The only thing the flow won't do is populate the table. 
     
     
    Full flow
     
     
     
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,454 Super User 2025 Season 2 on at
     
    Hmm I don't know why its not working for you. other than to say try the following which you can do #3 last after 1 and 2
     
     
    1. just verify the name is Table1 not table1
    2. Remove the " " around the values, sometimes that is the issue
     
    After your file create
    3. Put a Delay action and set it for 3-10 minutes
     
    Just as a test mind you. its possible that is actually the issue. The cache can be 3-10 minutes(roughly)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    @tpcolson Since Excel is not a server based Data Source make sure you add delays between creating the file, creating the table, and inserting the row into the table.  It takes a few seconds for Excel Online to commit the changes.  This works for me. Otherwise the screenshots provided by @Michael E. Gernaey should work.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard