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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,927)