[]
        
(Showing Draft Content)

WorkbookReference

Class WorkbookReference

java.lang.Object
com.grapecity.documents.excel.expressions.WorkbookReference

public final class WorkbookReference extends Object
Represents a reference to an external workbook. This class is immutable.
  • Field Details

  • Constructor Details

    • WorkbookReference

      public WorkbookReference()
  • Method Details

    • getBaseDirectory

      public String getBaseDirectory()
      The base directory that contains workbook. If the value is not null ,Name is the file name of workbook. If the value is empty, the path isthe root directory.
    • getBaseUri

      public String getBaseUri()
      The base uri that contains workbook.
      If the value is not null, Name is 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

      public String getName()
      The name of the workbook. If the BaseDirectory is not null, 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

      public static WorkbookReference FromFilePath(String workbookFullPath)
      Creates a workbook reference from file path.
      Parameters:
      workbookFullPath - The full path of workbook. It must be a valid filepath.
      Returns:
      Workbook reference.
    • FromUri

      public static WorkbookReference FromUri(String uri)
      Creates a workbook reference from a URI link to workbook.
      Parameters:
      uri - A URI link to the workbook.
      Returns:
      The workbook reference.
    • FromName

      public static WorkbookReference FromName(String name)
      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

      public boolean equals(Object obj)
      Check if the workbook reference equals to another.
      Overrides:
      equals in class Object
      Parameters:
      obj - Another workbook reference.
      Returns:
      equality.
    • equals

      public boolean equals(WorkbookReference other)
      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.
      Overrides:
      hashCode in class Object
      Returns:
      hash code.
    • toString

      public String toString()
      Converts workbook reference to string.
      Overrides:
      toString in class Object
      Returns:
      string value.