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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ERROR PAD "LaunchAndOp...
Power Automate
Unanswered

ERROR PAD "LaunchAndOpenUnderExistingProcess"

(0) ShareShare
ReportReport
Posted on by 296

Hello Community,

 

When running a flow in Power Automate Cloud, with "Run a flow built with for Power Automate Desktop" it gives me the following error,

 

Problem executing the "LaunchAndOpenUnderExistingProcess" action. Could not open Excel document ".xls" (Error related to a file).
Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Could not open Excel document ".xls" (File related error). ---> System.IO.FileNotFoundException: documentPathSafe
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.<>c__DisplayClass10_0.<LaunchExcel>g__SetActiveWorkbook|1()
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.LaunchExcel(Variant documentPath, Variant varPassword, Variant& excelInstance, Int32 launchMode, Boolean visible, Boolean loadAddInsAndMacros, Boolean needsAuthentication, Boolean readOnly, Boolean launchInNewInstance)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.LaunchExcel.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

How can I solve that?

 

fgonzalez515_0-1664932052122.png

 

But when running in Power Automate Desktop, it runs fine.

fgonzalez515_1-1664932667969.png

 

 

I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    Before Line #6 add a line of code to write the CroppedText to a Text file or a Display box.

    Run it again from the Cloud and see if it does not get the desired value.

  • fgonzalez515 Profile Picture
    296 on at

    Hi @VJR,

     

    Thanks for your answer.

    Excuse me, can you guide me how to do it, I did not understand well.

  • VJR Profile Picture
    7,635 on at

    For testing purposes,

    Above line #6, add Display box and show the %CroppedText% variable.

    Then run the process from the Cloud Flows

    Check what the Display box shows. Does the show the correct excel file or incorrect?

     

     

    One more thing,

    In line #6 it shows .xls

    in line #8 it is .xlsx

     

    Which extension is correct? - .xls or .xlsx?

     

  • fgonzalez515 Profile Picture
    296 on at

    Hi @VJR,

     

    Add Message Box and it runs fine in Power Automate Desktop, but running in the Cloud gives me the same error.

     

    fgonzalez515_0-1664967828859.png

     

     

    Problem executing the "LaunchAndOpenUnderExistingProcess" action. Could not open Excel document ".xls" (Error related to a file).
    Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Could not open Excel document ".xls" (File related error). ---> System.IO.FileNotFoundException: documentPathSafe
    at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.<>c__DisplayClass10_0.<LaunchExcel>g__SetActiveWorkbook|1()
    at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.LaunchExcel(Variant documentPath, Variant varPassword, Variant& excelInstance, Int32 launchMode, Boolean visible, Boolean loadAddInsAndMacros, Boolean needsAuthentication, Boolean readOnly, Boolean launchInNewInstance)
    --- End of inner exception stack trace ---
    at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.LaunchExcel.Execute(ActionContext context)
    at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

     

    fgonzalez515_1-1664967956647.png

     

    Yes, on line #6 it shows .xls, but on line #8 it is disabled, now delete line #8.
    I get the file as .xls and then save it as .xlsx so I can run SQL

     

    How can I solve that?

     

     

  • VJR Profile Picture
    7,635 on at

    But may I know why these are different?

     

    VJR_0-1664971013142.png

     

  • fgonzalez515 Profile Picture
    296 on at

    In line #3 I get Excel file in .xls

     

    In line #6 I open an Excel file in .xls and then in line #7 I close and save as .xlsx. I save the Excel file in .xlsx to filter items with SQL.

     

    In line #8 I delete Excel .xls file to empty the folder.

  • VJR Profile Picture
    7,635 on at

    Hi @fgonzalez515 

     

    It is clear from the error that somewhere the file name variable is not getting initialised and therefore it is not printing the full file name in the below error. It is inly printing the extension as seen below.

     

    Error: Could not open Excel document ".xls" (Error related to a file).

    System.IO.FileNotFoundException

     

    It is hard for me to diagnose and that too in a different language.

     

    - Check what parameters are you passing from the cloud flows.

    - For testing purpose add the default values to these parameters within Desktop flow and run it and test it that way.

     

  • fgonzalez515 Profile Picture
    296 on at

    Hi @VJR,

     

    I leave images of the flow in the language, in order to help understand.

    I did not understand the last two recommendations that you pointed out to me.

    If you can help me with that.

     

    fgonzalez515_0-1665356726381.png

     

    fgonzalez515_1-1665356756736.png

     

    fgonzalez515_2-1665356781571.png

     

     

     

  • VJR Profile Picture
    7,635 on at

    Hi @fgonzalez515 

    Instead of line #4, if you want to get the file name with/without extension then use Get file path part.

  • fgonzalez515 Profile Picture
    296 on at

    Hi @VJR,

     

    I used "Get part of a file path"

    How can I "Get part of a file path"?, because every time I download the file it changes its name. When selecting the "Get files from the folder" variable, it is not supported because it is "List of Files" and complementing it with a Range Number in Power Automate Cloud generates problems.

    When I run flow in Power Automate Desktop, everything runs fine.

     

    fgonzalez515_0-1665402455505.png

     

    fgonzalez515_2-1665405814041.png

     

    fgonzalez515_3-1665405995953.png

     

     

     

    fgonzalez515_1-1665405486865.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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 463 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 427 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard