[]
Represents a reference to an external workbook.
This class identifies an external workbook by file path, URI, or workbook name and is typically used together with Reference when building or modifying formula references. A workbook reference can be created by using FromFilePath(string), FromUri(string), or FromName(string).
public sealed class WorkbookReference : IEquatable<WorkbookReference>
Public NotInheritable Class WorkbookReference
Implements IEquatable(Of WorkbookReference)
GrapeCity.Documents.Excel.Expressions.NameNode nameNode = new GrapeCity.Documents.Excel.Expressions.NameNode("January");
nameNode.WorksheetName = "Sheet1";
nameNode.Workbook = WorkbookReference.FromName("Sales.xlsx");
| Name | Description |
|---|---|
| BaseDirectory | Gets the base directory that contains the workbook.
If the returned value is not |
| BaseUri | Gets the base URI that contains the workbook.
If the returned value is not
For example, for the URI
|
| Name | Gets the name of the workbook. |
| Name | Description |
|---|---|
| Equals(WorkbookReference) | Check if the workbook reference equals to another. |
| Equals(object) | Checks whether this workbook reference is equal to another workbook reference.
This method returns |
| FromFilePath(string) | Creates a workbook reference from a file path. This method splits the specified path into a base directory and workbook name. If the path points to a workbook in the root directory, the returned reference uses an empty string for BaseDirectory. |
| FromName(string) | Creates a workbook reference from a workbook name. Use this method when the workbook should be identified by name rather than by a file path or URI. The specified name can be different from the file name. |
| FromUri(string) | Creates a workbook reference from an absolute URI to a workbook. This method creates a reference whose base URI is the URI path up to, but not including, the workbook file name. File URIs are not supported. The specified URI must be absolute, must contain a host, and must contain a workbook file name. |
| GetHashCode() | Gets hash code of the workbook reference. |
| ToString() | Gets the string representation of this workbook reference. The returned string depends on how the reference was created. If this reference has no workbook name, the returned string is the workbook ID enclosed in square brackets. If it uses a base URI, the returned string combines the unescaped base URI with the unescaped workbook name in square brackets. If it stores only a workbook name, the returned string is the name enclosed in square brackets. If it uses a base directory, the returned string combines the base directory and the workbook name in square brackets. |