web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / retrieve excel attachm...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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.

I have the same question (0)
  • Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

    Hi @Anonymous,

     

    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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

  • Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

    Hi @Anonymous,

     

    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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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 Profile Picture
    33,869 Most Valuable Professional on at

    Hi @Anonymous,

     

    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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

  • Verified answer
    Expiscornovus Profile Picture
    33,869 Most Valuable Professional on at

    Hi @Anonymous,

     

    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

     

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 386

#2
Valantis Profile Picture

Valantis 342

#3
Haque Profile Picture

Haque 336

Last 30 days Overall leaderboard