[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Expressions.WorkbookReference

Class WorkbookReference

Namespace
GrapeCity.Documents.Excel.Expressions
Assembly
GcDocs.Excel.dll

Represents a reference to an external workbook. This class is immutable.

public sealed class WorkbookReference : IEquatable<WorkbookReference>
Inheritance
object
WorkbookReference
Implements
System.IEquatable<T><WorkbookReference>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Properties

BaseDirectory

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; }

Property Value

string

Remarks

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).

BaseUri

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; }

Property Value

string

Name

The name of the workbook. If the BaseDirectory is not null (Nothing), represents the file name of the workbook.

public string Name { get; }

Property Value

string

Methods

Equals(WorkbookReference)

Check if the workbook reference equals to another.

public bool Equals(WorkbookReference other)

Parameters

other WorkbookReference

Another workbook reference.

Returns

bool

Equals(object)

Check if the workbook reference equals to another.

public override bool Equals(object obj)

Parameters

obj object

Another workbook reference.

Returns

bool

FromFilePath(string)

Creates a workbook reference from file path.

public static WorkbookReference FromFilePath(string workbookFullPath)

Parameters

workbookFullPath string

The full path of workbook. It must be a valid file path.

Returns

WorkbookReference

A new WorkbookReference instance representing the workbook file.

FromName(string)

Creates a workbook reference from workbook name.

public static WorkbookReference FromName(string name)

Parameters

name string

The name of the workbook. It can be different from file name.

Returns

WorkbookReference

FromUri(string)

Creates a workbook reference from a URI link to workbook.

public static WorkbookReference FromUri(string uri)

Parameters

uri string

A URI link to the workbook.

Returns

WorkbookReference

GetHashCode()

Gets hash code of the workbook reference.

public override int GetHashCode()

Returns

int

ToString()

Converts workbook reference to string.

public override string ToString()

Returns

string