cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gmaasz
Helper IV
Helper IV

retrieve excel attachment and use rows of data in a desktop flow

I have a cloud flow which is triggered on the retrieval of an email with specific subject. I want to get the excel attachment data and push it through to be used in a desktop flow. Not sure how to do this. Can somebody please assist.

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @gmaasz,

 

Have you enabled the first line of range contains column names toggle button in your Read from Excel worksheet action in the advanced settings section?

 

firstlineofrangecontainscolumnnames.png

 

Alternatively, can you format your data as a table?

 

formatastable.png

 

 

 

 

 

View solution in original post

9 REPLIES 9
Expiscornovus
Super User II
Super User II

Hi @gmaasz,

 

Maybe the following approach is possible? Let me know if this works for you.

 

1. Save the attachment to a OneDrive site via the cloud flow

2. Make sure you have the OneDrive client sync setup on the machine where you are running your desktop flow

3. Create a desktop flow with a input parameters for your OneDrive local file system folder and one for your file filter (%NewInput%) and add those to a get files in folder action

onedrivedropfolder_desktopflows.png

4. Add a run a desktop flow action and make sure you use the OneDrive file name

newinput_desktopflows.png

Will the (%NewInput%) file filter be the file name?

Expiscornovus
Super User II
Super User II

@gmaasz, yes that's correct. Sorry, for the strange input parameter name in my example 😄

Now how do I actually take the table extracted and loop through each row and perform a function with the contents thereof?

Expiscornovus
Super User II
Super User II

Hi @gmaasz,

 

With a couple of actions you could launch Excel, determine the cell range (by using the get first free column/row action) and read the data.

 

readdataexcel_desktopflow.png

 

With an for each loop you can iterate to that ExcelData DataTable and execute your preferred actions. In my example I am setting variables and running a starting a subflow for each item.

foreach_currentitem.png

Can you please just provide the syntax which you type into the set var to get the value of the first cell, as well as how to create a sub flow. I got the steps right until here. Thanks so much for the assistance!

Expiscornovus
Super User II
Super User II

Hi @gmaasz,

 

Yes, sure.

 

The syntax of the first set variable is this:

%CurrentItem['AccountNumber']%

currentitem.png 

Subflows can created in the subflows menu, in the top left of PAD designer

 

subflows.png

Thanks please see the following images showing that my column cant be found even though it is pulled into my excel sheet.

flowissue1.jpgflowissue2.jpgflowissue3.jpgflowissue4.jpg

Expiscornovus
Super User II
Super User II

Hi @gmaasz,

 

Have you enabled the first line of range contains column names toggle button in your Read from Excel worksheet action in the advanced settings section?

 

firstlineofrangecontainscolumnnames.png

 

Alternatively, can you format your data as a table?

 

formatastable.png

 

 

 

 

 

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (48,252)