Class WorkbookReference
java.lang.Object
com.grapecity.documents.excel.expressions.WorkbookReference
Represents a reference to an external workbook. This class is immutable.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(WorkbookReference other) Check if the workbook reference equals to another.booleanCheck if the workbook reference equals to another.static WorkbookReferenceFromFilePath(String workbookFullPath) Creates a workbook reference from file path.static WorkbookReferenceCreates a workbook reference from workbook name.static WorkbookReferenceCreates a workbook reference from a URI link to workbook.The base directory that contains workbook.The base uri that contains workbook.intgetId()Gets or sets the workbook id if the reference came from low-level storage of formulas.getName()The name of the workbook.inthashCode()Gets hash code of the workbook reference.toString()Converts workbook reference to string.
-
Field Details
-
SupportsReferenceId
public static final boolean SupportsReferenceId- See Also:
-
-
Constructor Details
-
WorkbookReference
public WorkbookReference()
-
-
Method Details
-
getBaseDirectory
The base directory that contains workbook. If the value is notnull,Nameis the file name of workbook. If the value is empty, the path isthe root directory. -
getBaseUri
The base uri that contains workbook.
If the value is notnull,Nameis the file name ofworkbook.
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 . -
getName
The name of the workbook. If theBaseDirectoryis notnull, represents the file name of the workbook. -
getId
public int getId()Gets or sets the workbook id if the reference came from low-level storage of formulas. The default value is 0, which means the current workbook. -
FromFilePath
Creates a workbook reference from file path.- Parameters:
workbookFullPath- The full path of workbook. It must be a valid filepath.- Returns:
- Workbook reference.
-
FromUri
Creates a workbook reference from a URI link to workbook.- Parameters:
uri- A URI link to the workbook.- Returns:
- The workbook reference.
-
FromName
Creates a workbook reference from workbook name.- Parameters:
name- The name of the workbook. It can be different from file name.- Returns:
- Workbook reference.
-
equals
Check if the workbook reference equals to another. -
equals
Check if the workbook reference equals to another.- Parameters:
other- Another workbook reference.- Returns:
- equality.
-
hashCode
public int hashCode()Gets hash code of the workbook reference. -
toString
Converts workbook reference to string.
-