cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Hydrarian
Level: Powered On

Export CDS record list to excel file (user)

Hi there, is there a way to export all the record from a CDS in an Excel file in Google Drive? I don't have access to sharepoint or onedrive, just asking if there's a simple and tested way to do so. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Export CDS record list to excel file (user)

Hi @Hydrarian ,

Do you want to export all records from a CDS Entity into a Excel file stored in your Google Drive?

 

Based on the needs that you mentioned, If you want to achieve your needs using PowerApps, I think the ForAll function and Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:5.JPG

 

6.JPG

Set the OnSelect property of the "Patch" button to following:

ForAll(
TaskLists, /* <-- TaskLists represents the Entity in your CDS */
Patch(
Table1, /* <-- Table1 represents the Excel table stored in your Google Drive */
Defaults(Table1),
{
TaskName: TaskLists[@'Primary Name'],
Executor: TaskLists[@Register],
'Due Date': TaskLists[@'Due Date']
}
)
)

On your side, you may type:

ForAll(
YourCDSEntity, /* <-- TaskLists represents the Entity in your CDS */
Patch(
Table1, /* <-- Table1 represents the Excel table stored in your Google Drive */
Defaults(Table1),
{
ExcelTableColumn1: YourCDSEntity[@EntityColumn1],
ExcelTableColumn2: YourCDSEntity[@EntityColumn2],
ExcelTableColumn3: YourCDSEntity[@EntityColumn3],
...
}
)
)

when you press the "Patch" button within your app, the all records in your CDS Entity would be saved into the Excel table stored in your Google Drive.

Note: I assume that the Excel file stored in your Google Drive has been formatted as a Table already.

 

In addition, as an direct solution, you could consider click the "Edit data in Excel" option or "Export data" option within your CDS Entity as below:7.JPG

 

then it would download a Excel file or a zip file (which includes a csv file) into your local device. Then you could open the Excel file or CSV file, and copy data within it, and paste it into the Excel file stored in your Google Drive.

More details about exporting data from a CDS Entity, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-import-export

More details about opening a CDS data in Excel, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-excel-addin

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Export CDS record list to excel file (user)

Hi @Hydrarian ,

Do you want to export all records from a CDS Entity into a Excel file stored in your Google Drive?

 

Based on the needs that you mentioned, If you want to achieve your needs using PowerApps, I think the ForAll function and Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:5.JPG

 

6.JPG

Set the OnSelect property of the "Patch" button to following:

ForAll(
TaskLists, /* <-- TaskLists represents the Entity in your CDS */
Patch(
Table1, /* <-- Table1 represents the Excel table stored in your Google Drive */
Defaults(Table1),
{
TaskName: TaskLists[@'Primary Name'],
Executor: TaskLists[@Register],
'Due Date': TaskLists[@'Due Date']
}
)
)

On your side, you may type:

ForAll(
YourCDSEntity, /* <-- TaskLists represents the Entity in your CDS */
Patch(
Table1, /* <-- Table1 represents the Excel table stored in your Google Drive */
Defaults(Table1),
{
ExcelTableColumn1: YourCDSEntity[@EntityColumn1],
ExcelTableColumn2: YourCDSEntity[@EntityColumn2],
ExcelTableColumn3: YourCDSEntity[@EntityColumn3],
...
}
)
)

when you press the "Patch" button within your app, the all records in your CDS Entity would be saved into the Excel table stored in your Google Drive.

Note: I assume that the Excel file stored in your Google Drive has been formatted as a Table already.

 

In addition, as an direct solution, you could consider click the "Edit data in Excel" option or "Export data" option within your CDS Entity as below:7.JPG

 

then it would download a Excel file or a zip file (which includes a csv file) into your local device. Then you could open the Excel file or CSV file, and copy data within it, and paste it into the Excel file stored in your Google Drive.

More details about exporting data from a CDS Entity, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-import-export

More details about opening a CDS data in Excel, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-excel-addin

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,805)