[]
Gets the base directory that contains the workbook.
If the returned value is not null, Name represents the
file name of the workbook. If the returned value is an empty string, the path is
the root directory.
public string BaseDirectory { get; }
Public ReadOnly Property BaseDirectory As String
string workbookFullPath = Path.Combine("Users", "DefaultApps", "Documents", "Budget.xlsx");
WorkbookReference reference = WorkbookReference.FromFilePath(workbookFullPath);
string baseDirectory = reference.BaseDirectory;