cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vranjan22
Advocate II
Advocate II

upload excel table to sql database using PowerApp

Hi,

 

I am looking for options/ways to upload excel file/csv to SQL table using PowerApps.

 

The objective is to update bulk records at once in SQL.

 

Please help.

 

Thanks,

Vivek

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous, to open an msapp file, do these steps:

  1. Go to the PowerApps editor (create.powerapps.com)
  2. File > Open > browse for the msapp file

 

The import experience you're using is for exported zip files.

View solution in original post

14 REPLIES 14
mr-dang
Community Champion
Community Champion

Hi @vranjan22,

How do you feel about copy paste?

 

I have a solution you can copy data from an Excel spreadsheet (tabbed data) and paste it into a text input box. That data is split apart into a collection. And a button writes data to a datasource.

 

You'd just need to put in the column names and revise the formula for writing data a little bit to make it work.

 

https://aka.ms/pa/copypastecsv

 

Mr. Dang

_______

Microsoft Employee
@8bitclassroom
mr-dang
Community Champion
Community Champion

I should mention that the fastest and most efficient way to import records into SQL from Excel is to use the import wizard in SSMS. You can get thousands of records in there in seconds.

 

You can also use Collect() to write a bunch of records at once more efficiently, but you'll need to make sure the columns are exactly the same.

Collect(connected_table,local_collection) 

Brian

Microsoft Employee
@8bitclassroom
v-micsh-msft
Community Support
Community Support

Hi @vranjan22,

 

Here is the current situation:

1. PowerApps has no options available to upload a file and get its contents in a table format at the current time, the attachment control currently is only available with SharePoint List,

2. To work with Excel data within PowerApps, the Data within Excel file should be first formatted into a table, 

3. As @mr-dang mentioned, once you have connected the table within Excel, then it is available for you to bulk update records through collect() or forall() and patch().

4. Another workaround is to use Microsoft Flow within PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi there, I get an error when trying to import the test PowerApp you created.  Am I missing something obvious?

@Anonymous, to open an msapp file, do these steps:

  1. Go to the PowerApps editor (create.powerapps.com)
  2. File > Open > browse for the msapp file

 

The import experience you're using is for exported zip files.

View solution in original post

kmk
Helper V
Helper V

Hi @vranjan22 / @Mr-Dang-MSFT/ @Anonymous/ @Anonymous 

is this issue fixed ...?

kindly help me too, yes same requirement here as well from Excel to SQL Table.

in between can use flow or powerapps.

if export from powerapps to SQL table that is well and good.

 

kindly share steps wise.

Anonymous
Not applicable

Hi @mr-dang ,

 

Can you please share your solution or steps? 

The link that you have provided (https://aka.ms/pa/copypastecsv) doesn't work.

 

Thank you,

Mary

sgoyal
Frequent Visitor

Did anyone actually figure this out and if so please post the solution on a highlevel. 

 

Problem Statement: Need to give the users a UI in PowerApps to be able to attach/upload a CSV/excel file that can be displayed in a gallery in realtime as they attach it and then eventually as they visualize and hit the Save button the records are then saved to the data source (SQL in my case ) using Collect (using a flow and stored Proc to write to DB in my case (already figured out))

I am only trying to figure  out the part to be able to open an excel file table into a gallery and then submit it's records to the datasource (I already know how to save the records to database)

Hi @sgoyal, did you figure this out or found any workaround for this?

I also have the same requirement, if you resolved it could please post the solution?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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