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

Export to excel records from a gallery

I have this gallery with a button to export the records to excel.

wilsoncastro_0-1642809174868.png

This is the code in the button

wilsoncastro_1-1642809194818.png

In the button I call this flow

wilsoncastro_2-1642809210085.png

 

wilsoncastro_4-1642809237680.png

 

wilsoncastro_5-1642809246978.png

 

The result I get is this file

wilsoncastro_6-1642809260515.png

 

How can I improve the presentation of the file. I want it to look like this

wilsoncastro_7-1642809274948.png

 

3 REPLIES 3
Anonymous_Hippo
Super User
Super User

Hello @wilsoncastro,

 

There is an easier solution.

 

Just use the following link (Add your values as mentioned below)

 

Launch("https://Your Sharepoint Domain name/sites/your sharepoint site name/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={Your sharepoint list ID}&View={your sharepoint view ID}&CacheControl=1") 

 

In case you do not know what your sharepoint list id and view id are then check out this link

https://www.surfpointtech.com/2013/10/14/sharepoint-list-id-and-view-id-calculator/

 

and Bam !! simple solution

 

Hope it helps someone

 

@Anonymous_Hippo 

Thank you very much for your help, but how do I download only the gallery logs? Not the complete list.

wilsoncastro_0-1642985061045.png

 

 

 

Hello @wilsoncastro ,

 

I would like to know more about your data source :-

  1. Are you displaying a document library or a sharepoint list ?
  2. Are you filtering your gallery data source ? In case you are filtering the data source then there is no easy way of doing things (Unfortunately)

Incase you are filtering the data source and you want to format the file to make it look pretty. Then i would recommend using Office script. And running the office script to add a table + do cosmetics like you want by embedding it in your old flow 

Anonymous_Hippo_0-1643006498550.png

Also some heads up :-

Using office script may sound difficult since you need to know little bit of Typescript. But actually it is quite easy. Incase you are lost i recommend using the record script option to learn the basics of what you want to do.

 

Reference document:-

https://docs.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.table?view=of...

 

Cheers

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,768)