Change "File Path" Node so it suits any user

I’ve successfully created a script that exports multiple schedules to multiple tabs in Excel.

The option to choose the name of the exported excel file and where it is to be saved is via the “File Path” node.

When I use this node and point it to my desktop, the node reads “C:\Users\smithj\Desktop\test12345”. Now when I put this script in a server folder so anyone in my office can link to it with Dynamo Player. The script will be trying to save the excel file to their desktop but using my name and it won’t work.

So as this script was written specifically for a project, I changed the file path to a project folder located on our Network. server. Lets call this server “F”. When I was done, the script ran but no excel file appeared in the folder. I double checked and retried but it still didn’t work.

When I check the File Name Node, what was written in it was “C:…\Links\Cobie Excel Export_Import Files\test1234”. It had changed the F network location to C.

Can anyone assist please?

If you’re using the standard File Path node it should keep the correct path.
You could use Data-Shapes to allow the user to select the File Path.

I see that you are trying to export and import excel files through different systems. Dynamo does not have the functionality to automatically detect the location in a new system. I suggest that you may make a custom node where you shall make the file.path as a string node and let it access the User name itself. Hope, I have helped you.

Thankyou for your response, I downloaded and installed the Data Shapes package. I assumed the UI.FilePath Data node from the data shapes package is the correct one to use to allow the user to select the File Path. I am however unsure what nodes if any need to be connected to it.

I have of course wired the “UI.FilePath Data” “FilePath Input” node to the “Write Excel” “Filepath” node. Are other nodes needed to connect to the other side of the “UI.FilePath Data” node?

Image attached

Yes. The UI Multiple Input Form ++ node is missing. See the datashapes webpage for info.

What Jacob said. the UI Multiple Input Form ++ is the node that creates the Dialogue box. the Dialogue will feed the input to the Write Excel Command