Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Edit: Possibly solved? That was quick... See bottom.
How can I use a relative path when including reference worksheets?
The documentation suggests it is possible: "By default the include region displays the absolute path to the referenced worksheet. You can edit the path and make it relative."
I am collaborating with colleagues on a number of worksheets that include references to other worksheets. These are documents that 3 of us access and edit. We are currently using OneDrive, but the issue would remain even if all documents were emailed around. The "Include: path" changes, but all worksheets can exist in a single parent folder, or even a grandparent folder (which should work with a proper 'relative setup')
I have tried various ways like: ../ or ./ or / or //
https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats
I have found some ancient* threads discussing and confirming this ability as far back as 2004, but nothing new, or recent that suggests a way it can be done in Prime X.
Screen capture for reference.
Mathcad Prime 8.0
Thank you in advance!
Edit: Solution?
It looks like if you remove everything except the file name it works. This suggests that there is a limitation on files in the same directory.
Solved! Go to Solution.
I have tried various ways like: ../ or ./ or / or //
https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats
but you have not tried what you could read there -> you have to use backslashes, not forward slashes like in URLs!
So if a referenced worksheet "tables.mcdx" is located in a subdirectory "TESTDIR" of the directory of main sheet, you have to use ".\TESTDIR\tables.mcdx" (without the quotes, of course).
But you could as well simply use "TESTDIR\tables.mcdx" without explicitly referencing the current directory with ".\"
Many programs allow the use of forward slashes and convert them automatically into backslashes, but Prime does not. At least not when referencing/including worksheets - the various READ... functions like READBIN, etc. will allow the usage of forward slashes.
Glad you could figure it out!
I have tried various ways like: ../ or ./ or / or //
https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats
but you have not tried what you could read there -> you have to use backslashes, not forward slashes like in URLs!
So if a referenced worksheet "tables.mcdx" is located in a subdirectory "TESTDIR" of the directory of main sheet, you have to use ".\TESTDIR\tables.mcdx" (without the quotes, of course).
But you could as well simply use "TESTDIR\tables.mcdx" without explicitly referencing the current directory with ".\"
Many programs allow the use of forward slashes and convert them automatically into backslashes, but Prime does not. At least not when referencing/including worksheets - the various READ... functions like READBIN, etc. will allow the usage of forward slashes.