Originally posted by cjfoeller0404 on September 18, 2026
What is the process in which to use a relative file path to be able to import an Excel Sheet into a Stores|Tables object so that the table can be updated regardless of where in the file directory the TestComplete Project actually lives?
For example, if my file structure is something of the nature below, how would I access the Excelsheet.xlsx to import as a Stores|Tables New Excel Sheet?
Project Folder
Project Suite [.pjs file]
Project Folder
Project File [.mds file]
Data [Folder]
Excelsheet.xlsx
I have attempted “Data\Excelsheet.xlsx”, “.\Data\Excelsheet.xlsx”, “..\Data\Excelsheet.xlsx”, and “....\Data\Excelsheet.xlsx” getting the same file not found error each time.
Is there a way to perform this action with a relative file path?
Selecting the file via the UI seems to only ever add the absolute path.
Then you can use Project.Path together with the remaining path
// Using the standard open file dialog, to select a file
Sys.Browser(settings.GetBrowser()).WaitWindow("#32770", "Open", 1, 5000);
Sys.Browser(settings.GetBrowser()).Window("#32770", "Open", 1).OpenFile(Project.Path + "Stores\\Files\\WebcoverAddNewFile.xlsx");