cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Saratha30_M
Helper I
Helper I

Export to excel of SQL server data in canvas app

Hi All,

 

I have customized the canvas app by Azure SQL data connection. I would like to export the data which are displaying in the data table. How to achieve it. For export to excel, I am using Excel Online of Onedrive business. But it has some limitation of file size. Is any other way to create the export to excel from Canvas App. Please suggest the solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Saratha30_M ,

Could you tell me how many records in the data table that you want to update to the excel?

Since powerapps has delegation limit, you could only update at most 2000 records in one time.

So here are two solutions

1)save data in data table every two thousand records in one collection

Then update the collections data to the excel one by one

Do not forget to change the non-delegateable limit to 2000.

delegation.jpg

 

2)import sql data to cds (the way that I posted)

When you import data, you could use sql query to filter data to import.

Filter data to the data in the data table.

2179.PNG

 

Then export the cds entity to cvs file.

This solution does not have excel record number limit.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

Hi @Saratha30_M ,

Do you want to export data from SQL to Excel by using powerapps?

Is the limit of Excel 2000 records?

If so, that should be caused by delegation problem.

However, the functions about updating are all not delegateable in powerapps.

So I suggest you an alternative way:
Import data from SQL to CDS. Then you could export data of CDS. The exported file is a compressed folder with csv file.

In this solution, you will not have the limit of 2000 records.

The steps should be like:

1)In CDS, choose get data:
210.PNG

 

2)choose Azure SQL

2102.PNG

 Import data.

3)After you have imported data to CDS successfully, export data.

Choose export data.

2103.PNG

 

Choose the entity that you want to export and then click "export“.

After you've exported successfully, click "download....".

Then the download file is a compressed folder with csv file like this:

2104.PNG

 

This is a excel file with the data of your SQL.

You could modify it to the format that you want and then upload it to one drive.

 

 

Best regards,

 

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

Hi @v-yutliu-msft,

 

Thanks for your suggestion. I am not using CDS database.  Instead of CDS database, directly connecting to SQL database for data manipulation. So I can't use CDS export data feature for export to excel.

 

Hi @Saratha30_M ,

Could you tell me how many records in the data table that you want to update to the excel?

Since powerapps has delegation limit, you could only update at most 2000 records in one time.

So here are two solutions

1)save data in data table every two thousand records in one collection

Then update the collections data to the excel one by one

Do not forget to change the non-delegateable limit to 2000.

delegation.jpg

 

2)import sql data to cds (the way that I posted)

When you import data, you could use sql query to filter data to import.

Filter data to the data in the data table.

2179.PNG

 

Then export the cds entity to cvs file.

This solution does not have excel record number limit.

 

 

Best regards,

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

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,437)