cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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?

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?

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!

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

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (17,934)