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']}
}
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/
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
Hi @Hakim_Bouc
The variable you have initialized is of type "Boolean", change it to type "Array" and the error will be resolved.
@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 ?
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?
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:
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]}
}
]
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]
}
]
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:
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.
stampcoin
14
Churchy
12
rzaneti
8
Super User 2025 Season 1