[]
Represents a reference to an external workbook. This class is immutable.
public sealed class WorkbookReference : IEquatable<WorkbookReference>
The base directory that contains workbook. If the value is not null (Nothing), Name is the file name of workbook. If the value is empty, the path is the root directory.
public string BaseDirectory { get; }
Caution: System.IO.Path.Combine(System.String,System.String)
has different strategy for System.String.Empty and
null (Nothing).
Check this value with System.String.IsNullOrEmpty(System.String)
(or use = Nothing
in Visual Basic)
before passing it to System.IO.Path.Combine(System.String,System.String).
The base uri that contains workbook.
If the value is not null (Nothing),
Name is the file name of workbook.
For example, the base uri of https://www.grapecity.com/file/example.xlsx is
https://www.grapecity.com/file . The file name is example.xlsx .
public string BaseUri { get; }
The name of the workbook. If the BaseDirectory is not null (Nothing), represents the file name of the workbook.
public string Name { get; }
Check if the workbook reference equals to another.
public bool Equals(WorkbookReference other)
other
WorkbookReferenceAnother workbook reference.
Check if the workbook reference equals to another.
public override bool Equals(object obj)
obj
objectAnother workbook reference.
Creates a workbook reference from file path.
public static WorkbookReference FromFilePath(string workbookFullPath)
workbookFullPath
stringThe full path of workbook. It must be a valid file path.
A new WorkbookReference instance representing the workbook file.
Creates a workbook reference from workbook name.
public static WorkbookReference FromName(string name)
name
stringThe name of the workbook. It can be different from file name.
Creates a workbook reference from a URI link to workbook.
public static WorkbookReference FromUri(string uri)
uri
stringA URI link to the workbook.
Gets hash code of the workbook reference.
public override int GetHashCode()
Converts workbook reference to string.
public override string ToString()