cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sharuk
Helper V
Helper V

adding rows to excel

Hi All,

I'm having an item in my list as shown below

Sharuk_0-1627451813766.png

and I want to insert these details into excel file like this

Sharuk_1-1627452132201.png

 

when i use add row action it is showing only details & value like this

Sharuk_2-1627452179996.png

 

is there a way to pass column name into details and relevant field to value to get my desired output like this

Sharuk_1-1627452132201.png

1 ACCEPTED SOLUTION

Accepted Solutions
Nived_Nambiar
Resolver III
Resolver III

Hi @Sharuk 

You can try this 

 

I am assuming that you had only 3 columns 

 

Here i take three columns namely Title, ID, Shift as shown

Nived_Nambiar_0-1627457554221.png

'I had added data like as below

Nived_Nambiar_1-1627457578930.png

 

Now the flow will get triggers like this 

Nived_Nambiar_2-1627457617523.png

 

1. Set the trigger when the item is created in sharepoint list

 

2. Intialize a variable list_data like as below

Nived_Nambiar_3-1627457689963.png

 

 

3. Set variable with values that is the name of columns  which is in sharepoint list like as below

Nived_Nambiar_9-1627458385278.png

 

 

even you can set the values in Intialize variable too .

 

4. Body of added sharepoint data added in list is also an output from the trigger, use that in Parse Json action to parse the data ie body as shown below

Nived_Nambiar_5-1627457864450.png

 

add the schema too

 

5. Use Apply to ForEach action to loop through each values in list data 

 

Nived_Nambiar_6-1627457959903.png

 

Iniside the loop do the following

 

use add to row in Excel Online connector

 

and add the following property values

 

here in my excel i had item, value column 

in item i will add the Current Item 

in value i will add the following expression : body('Parse_JSON')?[items('Apply_to_each')]  

 

then after running this process u will get result like this 

Nived_Nambiar_8-1627458338674.png

 

 

 

Mark it as solution if it helps you

Regards,

Nived N

View solution in original post

1 REPLY 1
Nived_Nambiar
Resolver III
Resolver III

Hi @Sharuk 

You can try this 

 

I am assuming that you had only 3 columns 

 

Here i take three columns namely Title, ID, Shift as shown

Nived_Nambiar_0-1627457554221.png

'I had added data like as below

Nived_Nambiar_1-1627457578930.png

 

Now the flow will get triggers like this 

Nived_Nambiar_2-1627457617523.png

 

1. Set the trigger when the item is created in sharepoint list

 

2. Intialize a variable list_data like as below

Nived_Nambiar_3-1627457689963.png

 

 

3. Set variable with values that is the name of columns  which is in sharepoint list like as below

Nived_Nambiar_9-1627458385278.png

 

 

even you can set the values in Intialize variable too .

 

4. Body of added sharepoint data added in list is also an output from the trigger, use that in Parse Json action to parse the data ie body as shown below

Nived_Nambiar_5-1627457864450.png

 

add the schema too

 

5. Use Apply to ForEach action to loop through each values in list data 

 

Nived_Nambiar_6-1627457959903.png

 

Iniside the loop do the following

 

use add to row in Excel Online connector

 

and add the following property values

 

here in my excel i had item, value column 

in item i will add the Current Item 

in value i will add the following expression : body('Parse_JSON')?[items('Apply_to_each')]  

 

then after running this process u will get result like this 

Nived_Nambiar_8-1627458338674.png

 

 

 

Mark it as solution if it helps you

Regards,

Nived N

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,024)