Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kXGHlBqGnsfm4XeDKDLBN5
Power Automate - Building Flows
Answered

Add multiple rows to a table in excel

Like (0) ShareShare
ReportReport
Posted on 17 Nov 2020 12:23:43 by 28

Hi

Is there any way to add more than one row at at time to a table in excel?

 

Here is what I have - I'd like to have one row with customer name and then another line right under it with the customer number. If I can add more than one, what would I use as a separator?

 

Thanks

Becky

 

 

{
 "Label": "Customer Name",
 "Info": @{triggerOutputs()?['body/CustomerName']}
}

 

 

 

 

BeckyC_1-1605615619849.png

 

 

  • TheFreeMan Profile Picture
    48 on 10 May 2024 at 15:01:44
    Re: Add multiple rows to a table in excel

    A little late to the party, but this solution may work for you: https://www.matthewdevaney.com/quickly-add-multiple-rows-to-excel-table-in-power-automate/

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 29 Feb 2024 at 02:44:51
    Re: Add multiple rows to a table in excel

    @MasterRA 

     

    This newly updated Office Scripts solution can intake any JSON array with keys/fields matching a table’s column header and update & create rows in batches

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Excel-Batch-Create-Update-and-Upsert/td-p/1624706

  • Navansh Profile Picture
    27 on 23 May 2023 at 05:46:46
    Re: Add multiple rows to a table in excel

    Hi @Hakim_Bouc 

    The variable you have initialized is of type "Boolean", change it to type "Array" and the error will be resolved.

  • Hakim_Bouc Profile Picture
    19 on 13 Apr 2023 at 14:27:14
    Re: Add multiple rows to a table in excel

    @BeckyC @v-litu-msft 

    I found that power automate allow users to add only one row to excel, so I'm trying something else but I keep getting this error, any assistance please ?

    Hakim_Bouc_0-1681395998152.png

     

  • MasterRA Profile Picture
    66 on 01 Mar 2023 at 15:13:59
    Re: Add multiple rows to a table in excel

    This solution does not help at all because it is only feasible for a few records but for more than 1000 records it becomes unbearable and inefficient, the problem is that the user has to generate a report where there are almost always 1000 records (between more or less). and the unthinkable thing is that it takes almost more than half an hour processing record by record; It is not a solution that helps me and more because in almost all questions of this style they always suggest this "solution", why has no one thought of a real solution that only gives an example with 5 records?

  • MitchallC Profile Picture
    6 on 26 Apr 2022 at 11:30:34
    Re: Add multiple rows to a table in excel

    Having a wierd issue when trying to recreate this. It seems to be working fine and the input log all looks good but on the excel sheet I am only seeing empty rows being added. Could be relevant that the "apply to each" action is being called in a switch case.

     

    Array declaration:

    [
      {
        "Required Access Right""Advanced Find User"
      },
      {
        "Required Access Right""All Staff"
      },
      {
        "Required Access Right""Advanced Find User"
      },
      {
        "Required Access Right""All Staff"
      },
      {
        "Required Access Right""Advanced Find User"
      },
      {
        "Required Access Right""All Staff"
      }
    ]
     
    Input log from one of the row adding actions after test:
    {
        "host": {
            "connectionReferenceName""shared_excelonlinebusiness",
            "operationId""AddRowV2"
        },
        "parameters": {
            "source""sites/company_name_removed_for_anonimity",
            "drive""b!a1NxJql1KUuI3gPt_dNfS7eoonavXEJIohOx5JUncCDxMYfU-rB9RpdvgEvggm-p",
            "file""/Shared Documents/General/Temp/Mitch Cowell123 New Starter.xlsx",
            "table""{10D46297-E8F3-4192-B232-18502F3D5E3F}",
            "item": {
                "Required Access Right""All Staff"
            }
        }
    }
     
     
  • Navansh Profile Picture
    27 on 14 Apr 2021 at 14:13:13
    Re: Add multiple rows to a table in excel

    Found the solution 

     

    [

    {
    "Product Name": "Delta",
    "Year-1": @{variables('ProductsArrayY1')[0]},
    "Year-2": @{variables('ProductsArrayY2')[0]},
    "Year-3": @{variables('ProductsArrayY3')[0]},
    "Year-4": @{variables('ProductsArrayY4')[0]},
    "Year-5": @{variables('ProductsArrayY5')[0]}
    }

    ]

  • Navansh Profile Picture
    27 on 13 Apr 2021 at 03:13:10
    Re: Add multiple rows to a table in excel

    Hi @v-litu-msft 

     

    I tried the solution above but i am getting error The variable 'Array' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'Array' only supports values of types 'Array'.

     

     

     

    i initialised the variable Array with below value:

    [

    {
    "Product Name": "Delta",
    "Year-1": variables('ProductsArrayY1')[0],
    "Year-2": variables('ProductsArrayY2')[0],
    "Year-3": variables('ProductsArrayY3')[0],
    "Year-4": variables('ProductsArrayY4')[0],
    "Year-5": variables('ProductsArrayY5')[0]
    },
    {
    "Product Name": "Zeta",
    "Year-1": variables('ProductsArrayY1')[1],
    "Year-2": variables('ProductsArrayY2')[1],
    "Year-3": variables('ProductsArrayY3')[1],
    "Year-4": variables('ProductsArrayY4')[1],
    "Year-5": variables('ProductsArrayY5')[1]
    },
    {
    "Product Name": "Atos",
    "Year-1": variables('ProductsArrayY1')[2],
    "Year-2": variables('ProductsArrayY2')[2],
    "Year-3": variables('ProductsArrayY3')[2],
    "Year-4": variables('ProductsArrayY4')[2],
    "Year-5": variables('ProductsArrayY5')[2]
    }

    ]

    Capture.JPG

     

    Capture.JPG

  • Verified answer
    v-litu-msft Profile Picture
    on 18 Nov 2020 at 02:19:40
    Re: Add multiple rows to a table in excel

    Hi @BeckyC,

     

    Add a row into a table action only support add one row into the table once run, not support add multiple rows at the same time.

    If you want to add multiple rows to the excel table, you could initialize an array variable to store data you want to add, then use Apply to each + add a row into a table action to do it, for example:Screenshot 2020-11-18 101805.jpg

     

    Screenshot 2020-11-18 101849.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 14

#2
Churchy Profile Picture

Churchy 12

#3
rzaneti Profile Picture

rzaneti 8 Super User 2025 Season 1

Overall leaderboard
Loading started