I haven't tried but this may work: https://stackoverflow.com/questions/11629633/how-do-i-make-a-relative-reference-to-another-workbook-...
Thank you for your answer.
But, my question is about relative path in NX not in Excel.
I wrote the following expressions in NX12 :
All is OK, but I want to define the Filename with a relative path in the same directory as 3D models. When I change the expression Filename = "C:\Data.xlsx" by Filename = "\Data.xlsx", it does not work anymore !
Create below expression which will give you path of current part file along with part name:
You can extract path from above and use it.
@serrep , create Filename expression with below value. It will point to excel file kept at part file location.
Note that you'll need to use "Update for External Change" option to see any changes made later on.