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 / Set Excel as a Variable
Power Automate
Unanswered

Set Excel as a Variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have a flow that opens Excel using the control center due to add-ins so when it opens it is not a variable. I later need to reference the sheet for copy/paste, etc. How can I set it as a variable or reference the sheet/workbook? I am currently having the issue when trying to use get first free row and not being able to select the sheet.

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Use "Attach to Excel" action after it is opened.

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    Here is one possible solution for you:

    1. Launch Excel

    2. Set the worksheet

    3. Get the first free row

    Kaif_Siddique_0-1673468944396.png

     

    Hope this will help you.

     

    Regards

    Kaif

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks so much for your answer! I think this solution will work. I am receiving this error:

    kirabray_0-1673538204807.png

    Are there any other steps that must accompany?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    It is supposed to accept the whole path, so it's odd that it is erroring out.  But try just putting the name in the parameter:  AFO WIP Weekly.xlsx

     

    If that doesn't work, let me know.

     

    Also, instead of Wait 15 seconds...try Wait for Window.  Have the workbook open when you build this. 

    Find window:  By title and/or class

    Then press select window, hover over the workbook until you get a red box around the whole thing, and then Ctrl + Left Click to capture window info.

    Wait for Window to: Open

    Then have your attach function.

     

    Good luck!

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 142 Super User 2026 Season 2

Last 30 days Overall leaderboard