cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Select records from a gallery / Import data to Excel

Hello everyone,

 

I was wondering how I can select records from a gallery and then import those records to an excel file? I want something similar to the functionality import to excel that already exists in dynamics CRM!! 

 

Thank you !!! 

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Re: Select records from a gallery / Import data to Excel

Hi @Warda 

 

Direct export to excel is not supported. As a solution to this limitation, I developed a PCF control and when you pass a JSON formatted string as the value, it save the content as an Excel file.

You can refer to my blog on: https://www.bythedevs.com/post/export-to-excel-from-canvas-apps-in-power-apps-using-pcf 

Note: If you want to pass only selected items, you can make such a configuration where gallery selected records store in the collection and you can pass the collection in the input argument for the PCF control.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Select records from a gallery / Import data to Excel

Hello @yashag2255 ,

 

Thanks for your answer !! I have the same issue and i'm still a beginner ! I tried to follow the steps in your blog but it's a little bit hard for me ! Is there any other easy solution to do that ?

 

Thank you ! 

Highlighted
Dual Super User III
Dual Super User III

Re: Select records from a gallery / Import data to Excel

Hey @FadwaSa 

 

Can you share where are facing issues while using this component? I will help you to use it properly.

Currently, there is no direct way to do this. Another workaround would be to use Microsoft Power Automate but that is again a tedious process. That is why I came up with this PCF control to ease up the process and increase the speed.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Community Support
Community Support

Re: Select records from a gallery / Import data to Excel

Hi @Warda ,

Could you please share a bit more about your scenario?

Do you want to select records within the Gallery, then import these selected records into your Excel table?

 

Based on the needs that you mentioned, I think the Checkbox control, Patch function and ForAll function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

1. Add a Checkbox control within your Gallery (which connects to your D365 CRM Entity). If you want to import the record from the Gallery into your Excel, please check the corresponding Checkbox within the Gallery Item.

2. Add a "Submit" button outside the Gallery, set the OnSelect property of the "Submit" button to following:

ForAll(
        Filter(Gallery1.AllItems, Checkbox1.Value = true),  // filter Gallery Items with the Checkbox checked
        Patch(
              'YourExcelTable',
               Defaults('YourExcelTable'),
               {
                 ExcelTableColumn1: CRMEntityColumn1,
                 ExcelTableColumn2: CRMEntityColumn2,
                 ExcelTableColumn3: CRMEntityColumn3,
                 ...
               }
        )
)

 

Please check and see if my solution within the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/How-to-patch-a-checkbox-from-a-gall...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Within-a-Gallery-Set-the-value-of-a...

 

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.

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

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 (7,161)