cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DhineshKumar
Frequent Visitor

Flow to append a table into a excel file in sharepoint

Currently, I'm have created a flow that can upload the file to SharePoint. The challenge is that I have an excel file, say a.xlsx present in the SharePoint and I have a b.xlsx in my local repository with the same columns but totally different data. When I upload the b.xlsx through Powerapps it should append the b.xlsx into a.xlsx.

 

Is this possible?

 

can some help me from scratch?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @DhineshKumar,

 

After get rows, create an Apply to each action to loop through them, then add Add a row into a table action to add them into the master excel file. 

The expression should be item()?['columnName'], it means get current column value:

Annotation 2020-07-21 181744.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-litu-msft
Community Support
Community Support

Hi @DhineshKumar,

 

Yes, it is possible, you could create a flow to monitor a SharePoint folder. When b.xlsx file is created in the folder, Get its tables + Lists rows action to get all rows. Then use Apply to each action + Add a row into a table to append these rows into a.xlsx file.

Annotation 2020-07-17 143931.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

DhineshKumar
Frequent Visitor

The flow executes successfully but I don't see any rows add in the a.xlsx file. Did I miss something? I have done the exact representation of yours.

 

for example, I have a production data in monthly order. The file existing in the Sharepoint folder is jan_production.xlsx and when I add the file (i. e) feb_production.xlsx in SharePoint, the table in the feb_production.xlsx must be appended into the jan_production.xlsx.

 

 

In the action of adding a row how to get the values of each row. Do I have to use any expression to get the value? if so what is the expression used?. I think is happening due to the first trigger action of getting the properties only

MS flow (updating_file).JPG

Hi @DhineshKumar,

 

After get rows, create an Apply to each action to loop through them, then add Add a row into a table action to add them into the master excel file. 

The expression should be item()?['columnName'], it means get current column value:

Annotation 2020-07-21 181744.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

webbrewer
Resolver I
Resolver I

The answers above require that a table exists in the excel file, which is often not the case especially with files exported from 3rd party software. If your file has no tables, you can create a table following this guide:

http://webbrewers.com/microsoft-flow-append-excel-data-to-a-sharepoint-list/

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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