Pass excel path as argument from command prompt

Hi All,

I am planning open ui path from command prompt. I have an argument (path) created to pass excel file path to Excel Application Scope. i can run the uipath file from cmd prompt if i provide the excel file path in the uipath itself (i.e., as static path).

But i want to pass the excel file path as input value for “path” argument from command prompt. i used this link to create snippet code it is continuously throwing this error “Bad JSON escape sequence: \L. Path ‘path’, line 1, position 15.”

Please let me know what i am missing in the code? I have uploaded screnshots of command prompt and uipath program.

Robot accepts arguments as JSON string, therefore you have to follow the JSON formating rules.
Specifically backslash “” should be “escaped” as “\”.
So your path should look like : 'D:\Labview Projects\Workspace…



I tried doing as you said. May be i am not putting it in right way, its throwing different errors. Could you please given an example.

Problem of this forum editor :frowning:

You should use double-backslash in the JSON string like follows:

D:\\Labview Projects\\Workspace…


This works. Thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.