cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
schwibach
Resolver I
Resolver I

Create Excel file and add row

Hello,

 

I want to create an Excel File from a template and then add a single row with content from a Forms response to that new file and store it in SharePoint.

 

I have trouble referencing the newly created Excel file/table.

 

schwibach_0-1637418073138.png

 

I could create the new excel file by getting the file content from the template stored in SharePoint and then creating a new file with that content. (I could also create a new table in that file, but that doesn't seem to help me reference the table)

 

When I add a row to a table, I'm lacking the columns of the table to be filled in.

Is there a way to communicate the schema to PowerAutomate so it will let me fill in the columns for the file. 

 

Thank you guys!

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Super User
Super User

Hi @schwibach 

 

You want to use Get Table and then Filter on Table Name to get the First Match and save creating an apply to each loop.

 

DamoBird365_0-1637512612695.png

 

You can then call the table name from the filter with:

body('Filter_array')?[0]?['Name']

 

DamoBird365_1-1637512649268.png

and the row data is inserted as a JSON object - make sure you get your column names identical as it is case sensitive.

 

{"Col1":"1","Col2":"2","Col5":"5"}

 

DamoBird365_2-1637512699340.png

 

Please consider accepting my answer as a solution if it helps to solve your problem.

Cheers
Damien

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

 

View solution in original post

2 REPLIES 2
DamoBird365
Super User
Super User

Hi @schwibach 

 

You want to use Get Table and then Filter on Table Name to get the First Match and save creating an apply to each loop.

 

DamoBird365_0-1637512612695.png

 

You can then call the table name from the filter with:

body('Filter_array')?[0]?['Name']

 

DamoBird365_1-1637512649268.png

and the row data is inserted as a JSON object - make sure you get your column names identical as it is case sensitive.

 

{"Col1":"1","Col2":"2","Col5":"5"}

 

DamoBird365_2-1637512699340.png

 

Please consider accepting my answer as a solution if it helps to solve your problem.

Cheers
Damien

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

 

schwibach
Resolver I
Resolver I

Thank you so much! Works like a charm. Never would have guessed how to do it myself!!!!

THANK YOU!!!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,235)