Excel.WriteToFile user Documents path

Hi,

I use the excel.WriteToFile - node in a dynamoscript to be used by multiple people in the company. However, I struggle with the “filePath”-parameter. If I only specify the file name, e.g. export.xlsx, the file end up in the last used folder on my pc, which may be a folder related to another project. I would like the file to end up in the users “Documents” folder, but I struggle to find a way to do this. I have googled python scripts for getting this path, but most solutions depend on a package installed, and that is not feasible as most people would not be able to use it then. Any ideas?

Thanks in advance

Hi @jorgen.fidjeland

Will this help?

image

1 Like

It worked indeed!

I’ve did try similar solutions, but got python script error: “no module named os”, and I thought I needed to install some pachage which also other users would have to. But the sys.path.append worked like a charm.

Thanks for helping out a n00b!

Glad it Helped!

You’re welcome!