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

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
v-xida-msft
Community Support
Community Support

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
v-xida-msft
Community Support
Community Support

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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (35,930)