Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
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:
  • Pstork1 Profile Picture
    65,898 Most Valuable Professional on at
    How to add row to table when excel file is dynamically created in previous step
    @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
     
  • Verified answer
    Michael E. Gernaey Profile Picture
    40,272 Super User 2025 Season 1 on at
    How to add row to table when excel file is dynamically created in previous step
     
    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)
  • tpcolson Profile Picture
    80 on at
    How to add row to table when excel file is dynamically created in previous step
    @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
     
     
     
  • Michael E. Gernaey Profile Picture
    40,272 Super User 2025 Season 1 on at
    How to add row to table when excel file is dynamically created in previous step
     
    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
    How to add row to table when excel file is dynamically created in previous step
     
    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. 
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    40,272 Super User 2025 Season 1 on at
    How to add row to table when excel file is dynamically created in previous step
     
    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 :-)
  • Suggested answer
    Pstork1 Profile Picture
    65,898 Most Valuable Professional on at
    How to add row to table when excel file is dynamically created in previous step
    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
     
  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    How to add row to table when excel file is dynamically created in previous step
    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,898 Most Valuable Professional

Leaderboard