cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sgoyal0207
Helper I
Helper I

Creating a worksheet and table into an excel sheet

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@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

View solution in original post

10 REPLIES 10
DamoBird365
Super User
Super User

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
Helper I
Helper I

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

 

 

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

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

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.

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

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
Helper I
Helper I

Hi @DamoBird365 ,

Looking for your valuable advice.

 

Kind regards,

Sahil Goyal

 

@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

Hi @DamoBird365 ,

 

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

 

Thank you very much for you constant support.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,761)