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

Upload Excel file from PowerApps - append rows into existing SharePoint list

Hi All,

I am trying to create a flow that reads an Excel file from Power Apps and appends rows from the Excel file into an existing SharePoint list.

 

I have figured out the first part (uploading within PowerApps and reading the rows in Power Automate) but I am stuck on the next portion of the logic. I would also like to build logic that checks that the excel file being uploaded has the same number of rows as the SharePoint list. 

 

The way I currently have my flow setup is that it reads the Excel file from Power Apps (using JSON) and creates a new SharePoint  document upload. I was then trying to get the rows from the newly created SharePoint document and append them to my other main SharePoint list. I am not sure if this is the best way to do this and this is where I am a bit stuck. How do you easily read from a SharePoint document and then convert that to a SharePoint list? Any input would be greatly appreciated!

cmndflom_0-1629235325302.png

 

4 REPLIES 4
v-qiaqi-msft
Community Support
Community Support

Hi @cmndflom,

Do you want to import excel data to existing SP list?

Could you please share a bit more about your scenario?

Even though you have been able to upload files to SharePoint document library, I don't think it is an most efficient way to achieve this using JSON.

I think the most efficient way is to use PowerApps directly.

1). Format the excel data in Table

2). Create connection with the excel file(one drive) and your existing SharePoint list

3). Save the data in excel as a cllection:

ClearCollect(Data1,tablename)

4). Write the excel data to SharePoint list:

ForAll(Data1,Patch(listname,Defaults(listname),
{textfield:textfield,choicefield:{Value:choicefield},datefield:datefield,
numberfield:Value(numberfield),lookupfield:LookUp(Choices(listname.lookupfield),Value=lookupfield)}
)
)

You even don't need to upload the file within PowerApps to SharePoint library.

Hope it could help you at some degree.

Best Regards,
Qi

Due to restrictions within my organization, I am trying to avoid using OneDrive as a data source. Users will be uploading updated excel files and I want to take the rows from these new files and append them to an existing SharePoint list. The only way I have been able to get this upload feature to work (and avoid OneDrive) is by saving the file as a document library item using JSON to pass the information from PowerApps to Power Automate. I am looking for help in converting the file from a document library item so that I can read the rows in the file and append them to a SharePoint list.

Hi @cmndflom ,

 

Can you please share the steps and code to upload the excel into the SharePoint from PowerApps. Since upload is successful but file content is not in correct format. so unable to process the file ..

EvaR
Frequent Visitor

Hello, 

 

Have you been able to do this? I would really appreciate if you could share your solution. 

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,691)