Skip to main content

Notifications

Community site session details

Community site session details

Session Id : jdcfzasOaD54BxZer1YIdR
Power Automate - General Discussion
Unanswered

Add rows into an Excel file that is dynamically created

Like (2) ShareShare
ReportReport
Posted on 9 May 2019 14:26:30 by 95

I'm am using flow to copy an Excel template to a new folder in SharePoint. The folder is dynamically created, so the folder and template file do not exist before the flow runs. I then want to add rows into a table inside the newly created template file in the new folder.

 

It seems I can't dynamically reference this path and file to use the add rows to table action. I get the error message "Cannot evaluate the parameter 'path.$.file' at design-time; it is empty or has a runtime expression." if I try a dynamical reference.

 

Any clever workarounds to achieve the same thing?

  • Karel (ACSW) Profile Picture
    46 on 27 Mar 2023 at 16:23:03
    Re: Add rows into an Excel file that is dynamically created

    Wow this really did the trick easily, thank you so much for solving this issue!

     

    For anyone else still in pain, let me explain how you can set this up:

     

    1. Take this worksheet/table as an example, I already know what the tableheaders are because it's a template that is duplicated in my flow:

    sheet_table.png

     

    2. You simply map the tableheaders inside a JSON object, then you add this object in the 'row' parameter:

    json_object_add.png

  • nonono_username Profile Picture
    on 17 Jan 2023 at 11:22:16
    Re: Add rows into an Excel file that is dynamically created

    haha no need a present, your thanks is enough. Credits to Norm Young

    Happy 2023!

  • nerfherder Profile Picture
    128 on 17 Jan 2023 at 01:24:03
    Re: Add rows into an Excel file that is dynamically created

    nerfherder_0-1673918615719.png

    u BEAUTY. DM me your venmo plz and ill figure out a present for Norm

  • nerfherder Profile Picture
    128 on 17 Jan 2023 at 01:08:07
    Re: Add rows into an Excel file that is dynamically created

    @nonono_username omg JSON duh thank you so much if this works i will owe you a big one

  • nonono_username Profile Picture
    on 24 Oct 2022 at 12:36:15
    Re: Add rows into an Excel file that is dynamically created

    I found the answer thanks to Norm Young's article Export Microsoft List data to Excel – Norm Young
    When you enter a dynamic "File" name and a custom "Table" name as a variable or as a function like concat('myTableName') in the "Add a row into a table" action, a new field named "Row" will appear. In it you can add an object like this:

    {
     "ColumnName1":"Value1",
     "ColumnName2":"Value2"
    }

     

  • wbeedge Profile Picture
    4 on 24 Oct 2022 at 09:11:32
    Re: Add rows into an Excel file that is dynamically created

    Hi,

    I have started to use excel scripts to insert data into tables iso the excel connectors in Power Automate.
    Please have a look here: Convert CSV files to Excel workbooks - Office Scripts | Microsoft Learn

  • nonono_username Profile Picture
    on 22 Oct 2022 at 02:37:26
    Re: Add rows into an Excel file that is dynamically created

    Hi Manuel, in you blog your example shows how to list rows from the table. Do you know how to add rows to that table?

  • Community Power Platform Member Profile Picture
    on 02 Dec 2020 at 15:19:34
    Re: Add rows into an Excel file that is dynamically created

    You have to get the file metadata, and then use the ID from the metadata. I get the Full Path from Looping through SharePoint Files and making sure it is the same name.

     

    Snag_2fbd7b3.png

  • Lukas1 Profile Picture
    190 on 19 Nov 2020 at 10:24:59
    Re: Add rows into an Excel file that is dynamically created

    @kitUser No, I gave up on this...

  • kitUser Profile Picture
    27 on 22 Oct 2020 at 18:36:05
    Re: Add rows into an Excel file that is dynamically created

    I have the same problem. Any luck?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started