I am creating a library where one of the functions need to interact with an Excel file. It all works fine if I use the absolute path to the file.
However, I would also like to be able to use relative paths, e.g. Data\MyFile.xlsx.
I am trying to set a variable named baseDir = UiPath.Constants.Project.Location. But when publishing the library and using it in a project it looks for the file in the nuget folder of the library instead of the runtime folder of the calling project.
Is there any way around this without having to pass the current directory as an input argument?
if you want to pass the argument then you need to pass the full relative path
if you want to use the project folder and no passing of values is involved then you just need to create a global constant and not variable and use that global constant