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

Add rows to an excel table - Error

Hi folks, 

I'm building a flow that will essentially take data from a SQL server (using Get Rows V2) and populate an existing Excel file with a table. 

I'm having issues trying to get the output from SQL to populate the excel table. One part I have a feeling could be contributing to this problem is I want to use a friendly column name vs. what I currently have in SQL but I don't know what else could be missing. Does anyone have some thoughts how I could accomplish this? I'm interested in using this existing spreadsheet and pre-formatted table to allow our team to quickly print as needed. 

 

Thanks

6 REPLIES 6
Mira_Ghaly
Dual Super User II
Dual Super User II

@kevinsa 

If my understanding to your problem is correct; then it means you have an excel formatted as a table, so if I am correct you need to add and Apply to each loop to the output of Get Rows and then use Add Row in a table action as below:

Mira_Ghaly_0-1636322274053.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly 

Glad I was on the right track. I've added the apply to Each control, and this is the error I am being returned:

kevinsa_1-1636336412100.png

 

Everything up to that point looks good. I'm using the output from Select to add the rows into the Excel Table. 

 

kevinsa_2-1636336452578.png

kevinsa_4-1636336508796.png

 

 

 

Mira_Ghaly
Dual Super User II
Dual Super User II

@kevinsa 

Can you please share where are you getting the error exactly?

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly , that error is being thrown on Add Row into a Table

 

kevinsa_0-1636337899653.png

 

Mira_Ghaly
Dual Super User II
Dual Super User II

@kevinsa 

What is the value you are using here?

Mira_Ghaly_0-1636338064255.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly ,

 

I'm following the guide here:

Power Automate – Excel Dynamic Filename – Flow Alt Delete – Josh Cook [Microsoft MVP]

 

Since I need to use a pre-formatted table, I can't just create a table in a new file within the flow. That value in 'Table' is first(outputs('Get_tables')?['body/value'])['id'], where after the file is copied to Sharepoint I'm using an HTTP request to get the file ID to use in Get Tables in a previous action. 

kevinsa_0-1636338706874.png

 

 

 

 

Helpful resources

Announcements
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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,955)