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

Export collection to local stored Excel file

Hi  - 
Been looking around on various threads, but couldn't find anything that specifically solves my issue.

 

Need a way for the users to export a collection to a specific cell-range in an Excel (desktop) workbook. 

I also need to find a solution to open the stored Excel file directly for the app itself. Open it on Excel Online will not do.

 

Been experimenting with Flows to create a CVS stored on SP & the Launch() function, but wasn't able to proceed further. 

 

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Member

Re: Export collection to local stored Excel file

Hi,

 

I've managed to export a collection within PowerApps to both email, a Power BI dataset as well as a Excel file on teams. You can do this using the concat function in conjunction with substitute to create a jsonstring and then passing that string to flow. In flow you can further parse the jsonstring and do whatever you want with the collection.

 

Regards,

 

Richard van der Pool

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Export collection to local stored Excel file

There is no function or feature available to export the collection into an Excel file directly within PowerApps only.

We could save the file into a local file with the SaveData function or Export control, but the file format is restricted to only be available within PowerApps.

 

Wokring with Excel file requires there is a connection built directly under PowerApps, and currently there is no possible workaround that I am aware of to generate an Excel connection when the App is running.

 

So the situation here is, even if the collection could be saved into Excel CSV file through Microsoft Flow integration, there is no way to display/load the data into PowerApps directly.

 

 

Please consider rise this as an idea under PowerApps idea fourm, if you would like to have a better experience when working with Excel in PowerApps

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

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.
Highlighted
New Member

Re: Export collection to local stored Excel file

Hi,

 

I've managed to export a collection within PowerApps to both email, a Power BI dataset as well as a Excel file on teams. You can do this using the concat function in conjunction with substitute to create a jsonstring and then passing that string to flow. In flow you can further parse the jsonstring and do whatever you want with the collection.

 

Regards,

 

Richard van der Pool

View solution in original post

Highlighted
Frequent Visitor

Re: Export collection to local stored Excel file

Hello,

 

I just figured out a way to do this recently but the original data is stored in a SQL DB.  I get the data that I need from the DB into a collection which has the same field names as that in the SharePoint list so its easy to push to ex:

 

ClearCollect(CollectionName, ShowColumns('[dbo].[TABLENAME]', "Field1", "Field2", "Field3", "Field4" ))

 

Then I have a button that when pressed first deletes all of the entries in the SharePoint list, writes the collection with the latest values up to the SharePoint list then downloads an .iqy file which I have stored in a document library which then displays all of the contents in the excel file.  The .iqy file I got by going to the SharePoint list and clicking the Export to excel button then just saved it to a document library then point to the file.  The onSelect property for the button is:

 

RemoveIf(SharepointListName, !IsBlank(SharepointListName));

Collect(SharepointListName,CollectionName);
Download("https://company.sharepoint.com/sites/sitename/exportdocumentlibrary/export.iqy")

 

If the SharePoint list is the only copy of the data then storing the .iqy file in a document library then having a button running the Download command pointing to the file should do it.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,642)