cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Convert Attachment Excel File to Collection

Images and other media can be transformed on upload (attachment control) to JSON. 

How can we attach a .xlsx file in the SP PowerApp List and convert the data to a usable format within a collection?

Please and thank you. 

2 REPLIES 2
Anubha
Regular Visitor

Hi,

 

did you find anything on this?

Anonymous
Not applicable

You can do this in Flow, 

The procedure looks like this:

create a couple of variables and Get attachments from the row,

Robhcc_4-1636378865924.png

 

 

For each attachment, save to a separate document library (this is needed unfortunately)

Robhcc_1-1636378602600.png

Then grab the excel data as above (this action always returns in JSON)

 

Add Excel content to String (as JSON)

Robhcc_2-1636378669390.png

and close the apply to each

 

Clean up the tags to that it returns 1 table instead of many (this is the compose action

 

 

replace(replace(replace(replace(variables('Sites'), '][', ','), '{"value":', ''), '}]}', '}]'), '’', '')

 

 

Parse compose action back to Powerapps

Robhcc_3-1636378820771.png

The response action needs the schema for the excel data, this must be defined. If you run the flow against a sample you can generate the schema in Flow

Robhcc_0-1636379176930.png

 

You'll need to make sure that the excel files use tables and that the tables are the same. I have provided access to a template in the app (for the users) to aid with this restriction...

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,187)