Excel Application Scope and blanks in file path

I amusing Excel.Application.Scope activity but it crashes when using a file path that has an embedded blank.

When I hard code the path and file name the activity works fine. However, when I pass it as a string variable it fails. I have tried concatenating chr(34) to the front and back of the variable string to see if that gets around the issue, but that doesn’t work either.

Any Ideas?

Hi
welcome to uipath community
may i know the value of that string variable so that could validate that
Cheers @Mr_J

“C:\Temp_MJ\UiPath Testing\Ariba\Output\downloadFiles.xlsx”

Fine
if the string variable is
str_input = “C:\Temp_MJ\UiPath Testing\Ariba\Output\downloadFiles.xlsx”
then mentioning this variable in EXCEL APPLICATION SCOPE as a file path input would work actually, if that file path is correct

may i know what was the error you were getting may be with a screenshot if possible
Cheers @Mr_J

Kindly mention the variable name alone like this and try once
variablename.ToString
with no chr(34) on either side of the variable

Cheers @Mr_J

Just to prove that the file exists:
Capture

@Mr_J

Pass like this into Excel application scope activity.

   strExcelFilePath.Tostring.Trim

no difference
BTW (when I attach the file to an outlook message it doesn’t work either unless I hard code the file path (it is the exact same path)
Here is an screen shot of the code with the trim added

@Mr_J

Once give it a try with some other path and check it once.

I removed the space between “UiPath” and “Testing” from the above path. I am still getting illegal characters in path

However, if I use an assign block with the hard-code text of the path (with the space) the scope activity does work. So somehow the config dictionary is introducing an invalid character. Please note that this same config entry was used in other locations of the code and all have been working successfully. For example, another workflow in the process creates the file and then several other workflows update it and none of them had the issue. None of the other process used the application scope - they simply used “Write Range - the non Excel application scope version” that is why I thought this is an app scope issue.

I will close this item as it appears the workflow itself has some sort of corruption causing the issue. Thank you very much for you help @lakshman and @Palaniyappan

1 Like

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