Cannot Use Selected Excel

When running this bot, the end user will need to select the specific excel file they want the bot to use. I used the “Select File” step and had the selected file path be a save for later value, then plugged the save for later value into the “Use Excel File” step. I also tried saving the select file output to the clipboard. Both of these resulted in the below error: Illegal characters in path. The excel file itself does not have any characters other than letter in its name.

Show us your code, post screenshots. And use a Log Message to output the value of the path variable you’re passing to Use Excel File.

Here are the screenshots and the error message copied. Is the log message a step?


image

Error Message:
Exception Type: System.ArgumentException

RemoteException wrapping System.ArgumentException: Illegal characters in path.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at System.IO.FileInfo…ctor(String fileName)
at UiPath.Shared.Activities.ActivityArgumentHelper.GetValidAbsolutePath(InArgument1 filePath, ActivityContext context, String emptyArgumentErrorMessage, String nonexistentPathErrorMessageTemplate, String invalidCharactersInPathErrorMessage, String fileDoesNotExistMessageTemplate, Boolean checkFileExistsOrThrow) at UiPath.Excel.Activities.Business.ExcelApplicationCard.<>c__DisplayClass54_0.<GetWorkbookPath>b__0() at UiPath.Shared.Activities.ActivityArgumentHelper.GetValidPath(String path, Func1 getLocalPathFunc, Func`1 getSharePointUrlFunc)
at UiPath.Excel.Activities.Business.ExcelApplicationCard.GetWorkbookPath(ActivityContext context)
at UiPath.Excel.Activities.Business.ExcelApplicationCard.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Yes, before the Use Excel File activity, put a Log Message activity and give it the SelectedFile variable. Then when you run the automation you’ll see the value of that variable in the Output panel. Once you have that, post it here.

Hi @charlotte.e

The error message indicates an “Illegal characters in path” exception.

Check File Path:
Examine the file path you are providing to the Excel activity. Ensure it does not contain any illegal characters or invalid syntax.

Use Full Path:
Use full path to the file instead of a relative path.

Hi @charlotte.e ,
This error notification is mean your path is not correct
let add a log message or message box
image
.tostring
image
to check it correct or not
Regards,

Is the log message activity in an additional package? I’m not seeing that step listed in StudioX

It’s a standard activity in UiPath.System.Activities