Skip to main content

Notifications

Power Automate - Power Automate Desktop
Answered

ERROR PAD "LaunchAndOpenUnderExistingProcess"

(0) ShareShare
ReportReport
Posted on by 292

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

 

 

  • fgonzalez515 Profile Picture
    fgonzalez515 292 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    .

  • Verified answer
    VJR Profile Picture
    VJR 7,635 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    Hi @fgonzalez515 

     

     

    With the help of CurrentItem you can use the File Path part

     

    In the below toggle buttons, either enable filename or filenamenoextension as per your requirements.

    VJR_1-1665455751370.png

     

     

    VJR_0-1665455656234.png

     

  • fgonzalez515 Profile Picture
    fgonzalez515 292 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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

     

     

  • VJR Profile Picture
    VJR 7,635 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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
    fgonzalez515 292 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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
    VJR 7,635 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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
    fgonzalez515 292 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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
    VJR 7,635 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    But may I know why these are different?

     

    VJR_0-1664971013142.png

     

  • fgonzalez515 Profile Picture
    fgonzalez515 292 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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
    VJR 7,635 on at
    Re: ERROR PAD "LaunchAndOpenUnderExistingProcess"

    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?

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard