Getting a name of Excel's file

Hi guys,
I have done some actions with excel file in excel operation scope.
Now I need to get it’s name(of this file) to use it further in web search.
How can I do that?
Thanks

Hi @Slavich,

Excel Application Scope has an output Argument [Workbook] of type WorkbookApplication
You can return the Argument value to a variable and then use Path.GetFileName on it :slight_smile:

Path.GetFileName([WorkbookVariable].CurrentWorkbook.FullName)

Best Regards,
Filip

1 Like

Got it!
Thanks a lot!

@Slavich

I developed one Activity to extract filename from full path of the file.

https://go.uipath.com/component/get-filename

2 Likes

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