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 / Launch excel error whe...
Power Automate
Unanswered

Launch excel error when providing path from Input variable

(2) ShareShare
ReportReport
Posted on by 62

HI,

 

Unable to launch excel when I am providing file path through INPUT variable Default value

 

path is correct , as when provided directly to launch excel action it is working perfect , only error when passing through input variable.

 

error - Failed to open Excel Document (File related error)

 

Please Help

@miketran13 launch excel err 1.PNGlaunch excel err 2.PNGlaunch excel err 3.PNG

 

Thanks 

 

AR

I have the same question (0)
  • HarshChauhan Profile Picture
    52 on at

    did you find the solution?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi amamidwar23 & HarshChauhan

     

    Please double check to see if the extension of path is correct or not.

    As it should be “.xlsx” ".xlsm" etc. instead of "_xlsm"

     

    Please see the reference.

    on99username_1-1642041224062.png

     

    Hope it helps.

    Please mark it answered if you are satisfied.

     

    Thanks.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have the exact same issue.

    File opens fine when i add the path directly, but file wont open when the variable with the filepath is used.

    The same error goes for 'Run Application' action.

     

    Is there any fix for this? If not, it seems like a big deal, not to be able to use variables with filepaths.

  • Thomas_Petersen Profile Picture
    86 on at

    Depending on your OS config, you might need to escape the '\' . Try replacing each \ with \\.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That does not seem to be the issue.

    Because it works fine when i add D:\test.xlsx  to 'Document path:' field.

     

    I have done some further tests:
    When i use the variable, that Power Automate created by using "Get files in folder", it does not work. Even though the correct filepath is shown.

     

    My solution to this, is using a 'For Each' step to loop through the 'Files' variable that 'Get files in folder' step created.
    Then adding a 'If' step to find the specific file I want  (using contains test.xlsx)

    Then using 'Set variable' to set 'CurrentItem' variable (that was created by the 'If' action) to my own variable called 'filepath'.

    Next using the launch excel step, to open the excel file with 'filepath' variable.

     

    This is too much work. The 'Get files in folder' step, should be able to produce the a working variable that can be used directly in Launch excel or Run Application.

  • PapaOssis Profile Picture
    12 on at

    I have the same issue.

    Looks like MS is not going to fix this.... maybe there is a work around.. 

  • Heath2 Profile Picture
    2 on at

    For what it's worth I have found a solution. On the list that you are wanting to loop through, take the .xlsx of the end of the file path and then add that string to the end of the variable in the loop like below. It then loops through. Hope this helps someone! I wasted hours on trying to get this to work. 

     

    Heath2_0-1678460326952.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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard