web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a worksheet a...
Power Automate
Answered

Creating a worksheet and table into an excel sheet

(0) ShareShare
ReportReport
Posted on by 34

Hi All,

 

Need your help on the mentioned issue.

 

I have built a flow to create a table and then add rows to it but every time I run the flow I get this(screenshot attached) error.

sgoyal0207_0-1652274567193.png

 

My flow and inputs are:

sgoyal0207_1-1652274604681.png

 

Input value into Compose 2:

[
{
"Region": "North East Asia",
"Country":"China",
"To Hub":"Dalian",
"Preferred ": null
"Non-preferred": null
"Products ": null
"Remark": null
},

{
"Region": "North East Asia",
"Country":"China",
"To Hub":"Huangpu",
"Preferred ":null
"Non-preferred":null
"Products":null
"Remark":null
}
]

 

Not sure where I am doing mistakes.

 

 

Categories:
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @sgoyal0207 

     

    Looks like you have used the wrong compose for your apply to each.  Your error is referring to the file content compose, but you presumably want to create two rows in a new table and would therefore need to pass the compose 2 action to the apply to each and loop through each object.

     

    Probably looking to do the following? https://youtu.be/RB_ySjhm9Sg

     

    If you are looking to import a lot of data into excel, take a look at office scripts https://youtu.be/4g8Lh0gzEnc 


    Damien

    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts.

  • sgoyal0207 Profile Picture
    34 on at

    Hi @DamoBird365 

    Thank you for your reply.

     

    I am trying to create a worksheet in an excel file in One drive. Your video does help to create a file in Sharepoint.

     

    I have already passed the compose 2 action o apply to each and loop it.

     

    sgoyal0207_1-1652325697176.png

     

     

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @sgoyal0207 

     

    Can you show me the expressions you have used in your apply to each input, and for the add row to table? Has the error changed since you replaced the input of the apply to each?  If the video hasn’t helped your understanding, you need to share more detail.

     

    Damien

  • sgoyal0207 Profile Picture
    34 on at

    Hi @DamoBird365 ,

     

    I found the error and now the loop is working well.

     

    But I have one more question, Can we use "Get file content" and then use "Compose" to run the loop? This will help to automatically get the data from the file instead of typing it down manually.

     

    Thanks in advance!!

     

    Kind regards,

    Sahil Goyal

  • sgoyal0207 Profile Picture
    34 on at

    Hi @DamoBird365 ,

     

    Got one more issue.

    I am trying to run the loop for 13 rows but it only runs for the first 10. Can you help me with this.

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @sgoyal0207 

     

    You're going to have to share a bit more detail I’m afraid. Some screenshots maybe? How did you solve the original problem so that others can benefit?

     

    Damien

  • sgoyal0207 Profile Picture
    34 on at

    Hi @DamoBird365 ,

     

    Initially, my column name includes a dot(.) after "export side of the hub" which gives the error during "apply to each" loop.

    sgoyal0207_0-1652432750500.png

    Once I removed the dot (.) the flow runs smooth.

    --------------------------------------------------------------------------------------------------------

    Flow:

    sgoyal0207_1-1652432939431.png

    I hope this will explain properly. 

    -----------------------------------------------------------------

    The current problem I am facing after running the flow. The output data is not the same as the File content.

     

    File content data:

    sgoyal0207_2-1652433451060.png

     

    Output data:

    sgoyal0207_3-1652433494991.png

     

    Kind Regards,

    Sahil

     

  • sgoyal0207 Profile Picture
    34 on at

    Hi @DamoBird365 ,

    Looking for your valuable advice.

     

    Kind regards,

    Sahil Goyal

     

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @sgoyal0207 

     

    Apologies, I had missed your reply.  Presumably you have used the same dynamic value for each of your columns?  Can you share a screenshot of the add row action whilst in edit?

     


    Cheers
    Damien

    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks

  • sgoyal0207 Profile Picture
    34 on at

    Hi @DamoBird365 ,

     

    You were right, I did a mistake in the "value for each" step.

     

    Thank you very much for you constant support.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard