org.apache.poi.xssf.usermodel

## Class BaseXSSFEvaluationWorkbook

- java.lang.Object
- - org.apache.poi.xssf.usermodel.BaseXSSFEvaluationWorkbook

- All Implemented Interfaces:
    EvaluationWorkbook, FormulaParsingWorkbook, FormulaRenderingWorkbook
  Direct Known Subclasses:
    SXSSFEvaluationWorkbook, XSSFEvaluationWorkbook

      @Internal
      public abstract class BaseXSSFEvaluationWorkbook
      extends java.lang.Object
      implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook

  Internal POI use only - parent of XSSF and SXSSF evaluation workbooks

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.poi.ss.formula.EvaluationWorkbook

      `EvaluationWorkbook.ExternalName, EvaluationWorkbook.ExternalSheet, EvaluationWorkbook.ExternalSheetRange`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected XSSFWorkbook` | `_uBook`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseXSSFEvaluationWorkbook(XSSFWorkbook book)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearAllCachedResultValues()` Propagated from `WorkbookEvaluator.clearAllCachedResultValues()` to clear locally cached data.
    `int` | `convertFromExternSheetIndex(int externSheetIndex)` XSSF doesn't use external sheet indexes, so when asked treat it just as a local index
    `XSSFName` | `createName()` Return the underlying workbook
    `Ptg` | `get3DReferencePtg(AreaReference area, SheetIdentifier sheet)` Produce the appropriate Ptg for a 3d area reference
    `Ptg` | `get3DReferencePtg(CellReference cell, SheetIdentifier sheet)` Produce the appropriate Ptg for a 3d cell reference
    `EvaluationWorkbook.ExternalName` | `getExternalName(int externSheetIndex, int externNameIndex)` HSSF Only - fetch the external-style name details
    `EvaluationWorkbook.ExternalName` | `getExternalName(java.lang.String nameName, java.lang.String sheetName, int externalWorkbookNumber)` XSSF Only - fetch the external-style name details
    `EvaluationWorkbook.ExternalSheet` | `getExternalSheet(int externSheetIndex)` HSSF Only - fetch the external-style sheet details
    `EvaluationWorkbook.ExternalSheet` | `getExternalSheet(java.lang.String firstSheetName, java.lang.String lastSheetName, int externalWorkbookNumber)` XSSF Only - fetch the external-style sheet details
    `int` | `getExternalSheetIndex(java.lang.String sheetName)` gets the externSheet index for a sheet from this workbook
    `int` | `getExternalSheetIndex(java.lang.String workbookName, java.lang.String sheetName)` gets the externSheet index for a sheet from an external workbook
    `EvaluationName` | `getName(NamePtg namePtg)`
    `EvaluationName` | `getName(java.lang.String name, int sheetIndex)` Return EvaluationName wrapper around the matching XSSFName (named range)
    `java.lang.String` | `getNameText(NamePtg namePtg)`
    `NameXPxg` | `getNameXPtg(java.lang.String name, SheetIdentifier sheet)` Return an external name (named range, function, user-defined function) Pxg
    `java.lang.String` | `getSheetFirstNameByExternSheet(int externSheetIndex)`
    `int` | `getSheetIndex(java.lang.String sheetName)` Finds a sheet index by case insensitive name.
    `java.lang.String` | `getSheetLastNameByExternSheet(int externSheetIndex)`
    `java.lang.String` | `getSheetName(int sheetIndex)`
    `SpreadsheetVersion` | `getSpreadsheetVersion()` Returns an enum holding spreadhseet properties specific to an Excel version ( max column and row numbers, max arguments to a function, etc.)
    `XSSFTable` | `getTable(java.lang.String name)` Returns the data table with the given name (case insensitive).
    `UDFFinder` | `getUDFFinder()`
    `java.lang.String` | `resolveNameXText(NameXPtg n)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.poi.ss.formula.EvaluationWorkbook

      `getFormulaTokens, getSheet, getSheetIndex`

- - ### Field Detail

    - #### _uBook

          protected final XSSFWorkbook _uBook

  - ### Constructor Detail

    - #### BaseXSSFEvaluationWorkbook

          protected BaseXSSFEvaluationWorkbook(XSSFWorkbook book)

  - ### Method Detail

    - #### clearAllCachedResultValues

          public void clearAllCachedResultValues()

      Description copied from interface: `EvaluationWorkbook`
      Propagated from `WorkbookEvaluator.clearAllCachedResultValues()` to clear locally cached data. Implementations must call the same method on all referenced `EvaluationSheet` instances, as well as clearing local caches.
      Specified by:
        `clearAllCachedResultValues` in interface `EvaluationWorkbook`
      See Also:
        `WorkbookEvaluator.clearAllCachedResultValues()`

    - #### convertFromExternSheetIndex

          public int convertFromExternSheetIndex(int externSheetIndex)

      XSSF doesn't use external sheet indexes, so when asked treat it just as a local index
      Specified by:
        `convertFromExternSheetIndex` in interface `EvaluationWorkbook`

    - #### getExternalSheetIndex

          public int getExternalSheetIndex(java.lang.String sheetName)

      Description copied from interface: `FormulaParsingWorkbook`
      gets the externSheet index for a sheet from this workbook
      Specified by:
        `getExternalSheetIndex` in interface `FormulaParsingWorkbook`

    - #### getName

          public EvaluationName getName(java.lang.String name,
                                        int sheetIndex)

      Return EvaluationName wrapper around the matching XSSFName (named range)
      Specified by:
        `getName` in interface `EvaluationWorkbook`
      Specified by:
        `getName` in interface `FormulaParsingWorkbook`
      Parameters:
        `name` - case-aware but case-insensitive named range in workbook
        `sheetIndex` - index of sheet if named range scope is limited to one sheet if named range scope is global to the workbook, sheetIndex is -1.
      Returns:
        If name is a named range in the workbook, returns EvaluationName corresponding to that named range Returns null if there is no named range with the same name and scope in the workbook

    - #### getSheetName

          public java.lang.String getSheetName(int sheetIndex)

      Specified by:
        `getSheetName` in interface `EvaluationWorkbook`

    - #### getExternalName

          public EvaluationWorkbook.ExternalName getExternalName(int externSheetIndex,
                                                                 int externNameIndex)

      Description copied from interface: `EvaluationWorkbook`
      HSSF Only - fetch the external-style name details
      Specified by:
        `getExternalName` in interface `EvaluationWorkbook`

    - #### getExternalName

          public EvaluationWorkbook.ExternalName getExternalName(java.lang.String nameName,
                                                                 java.lang.String sheetName,
                                                                 int externalWorkbookNumber)

      Description copied from interface: `EvaluationWorkbook`
      XSSF Only - fetch the external-style name details
      Specified by:
        `getExternalName` in interface `EvaluationWorkbook`

    - #### getNameXPtg

          public NameXPxg getNameXPtg(java.lang.String name,
                                      SheetIdentifier sheet)

      Return an external name (named range, function, user-defined function) Pxg
      Specified by:
        `getNameXPtg` in interface `FormulaParsingWorkbook`

    - #### get3DReferencePtg

          public Ptg get3DReferencePtg(CellReference cell,
                                       SheetIdentifier sheet)

      Description copied from interface: `FormulaParsingWorkbook`
      Produce the appropriate Ptg for a 3d cell reference
      Specified by:
        `get3DReferencePtg` in interface `FormulaParsingWorkbook`

    - #### get3DReferencePtg

          public Ptg get3DReferencePtg(AreaReference area,
                                       SheetIdentifier sheet)

      Description copied from interface: `FormulaParsingWorkbook`
      Produce the appropriate Ptg for a 3d area reference
      Specified by:
        `get3DReferencePtg` in interface `FormulaParsingWorkbook`

    - #### resolveNameXText

          public java.lang.String resolveNameXText(NameXPtg n)

      Specified by:
        `resolveNameXText` in interface `EvaluationWorkbook`
      Specified by:
        `resolveNameXText` in interface `FormulaRenderingWorkbook`

    - #### getExternalSheet

          public EvaluationWorkbook.ExternalSheet getExternalSheet(int externSheetIndex)

      Description copied from interface: `EvaluationWorkbook`
      HSSF Only - fetch the external-style sheet details

      Return will have no workbook set if it's actually in our own workbook

      Specified by:
        `getExternalSheet` in interface `EvaluationWorkbook`
      Specified by:
        `getExternalSheet` in interface `FormulaRenderingWorkbook`
      Returns:
        `null` if externSheetIndex refers to a sheet inside the current workbook

    - #### getExternalSheet

          public EvaluationWorkbook.ExternalSheet getExternalSheet(java.lang.String firstSheetName,
                                                                   java.lang.String lastSheetName,
                                                                   int externalWorkbookNumber)

      Description copied from interface: `EvaluationWorkbook`
      XSSF Only - fetch the external-style sheet details

      Return will have no workbook set if it's actually in our own workbook

      Specified by:
        `getExternalSheet` in interface `EvaluationWorkbook`

    - #### getExternalSheetIndex

          @NotImplemented
          public int getExternalSheetIndex(java.lang.String workbookName,
                                                           java.lang.String sheetName)

      Description copied from interface: `FormulaParsingWorkbook`
      gets the externSheet index for a sheet from an external workbook
      Specified by:
        `getExternalSheetIndex` in interface `FormulaParsingWorkbook`
      Parameters:
        `workbookName` - e.g. "Budget.xls"
        `sheetName` - a name of a sheet in that workbook

    - #### getSheetIndex

          public int getSheetIndex(java.lang.String sheetName)

      Description copied from interface: `EvaluationWorkbook`
      Finds a sheet index by case insensitive name.
      Specified by:
        `getSheetIndex` in interface `EvaluationWorkbook`
      Returns:
        the index of the sheet matching the specified name. -1 if not found

    - #### getSheetFirstNameByExternSheet

          public java.lang.String getSheetFirstNameByExternSheet(int externSheetIndex)

      Specified by:
        `getSheetFirstNameByExternSheet` in interface `FormulaRenderingWorkbook`
      Returns:
        the name of the (first) sheet referred to by the given external sheet index

    - #### getSheetLastNameByExternSheet

          public java.lang.String getSheetLastNameByExternSheet(int externSheetIndex)

      Specified by:
        `getSheetLastNameByExternSheet` in interface `FormulaRenderingWorkbook`
      Returns:
        the name of the (last) sheet referred to by the given external sheet index

    - #### getNameText

          public java.lang.String getNameText(NamePtg namePtg)

      Specified by:
        `getNameText` in interface `FormulaRenderingWorkbook`

    - #### getName

          public EvaluationName getName(NamePtg namePtg)

      Specified by:
        `getName` in interface `EvaluationWorkbook`

    - #### createName

          public XSSFName createName()

      Description copied from interface: `FormulaParsingWorkbook`
      Return the underlying workbook
      Specified by:
        `createName` in interface `FormulaParsingWorkbook`

    - #### getTable

          public XSSFTable getTable(java.lang.String name)

      Returns the data table with the given name (case insensitive). Tables are cached for performance (formula evaluation looks them up by name repeatedly). After the first table lookup, adding or removing a table from the document structure will cause trouble. This is meant to be used on documents whose structure is essentially static at the point formulas are evaluated.
      Specified by:
        `getTable` in interface `FormulaParsingWorkbook`
      Parameters:
        `name` - the data table name (case-insensitive)
      Returns:
        The Data table in the workbook named `name`, or `null` if no table is named `name`.
      Since:
        3.15 beta 2

    - #### getUDFFinder

          public UDFFinder getUDFFinder()

      Specified by:
        `getUDFFinder` in interface `EvaluationWorkbook`

    - #### getSpreadsheetVersion

          public SpreadsheetVersion getSpreadsheetVersion()

      Description copied from interface: `FormulaParsingWorkbook`
      Returns an enum holding spreadhseet properties specific to an Excel version ( max column and row numbers, max arguments to a function, etc.)
      Specified by:
        `getSpreadsheetVersion` in interface `EvaluationWorkbook`
      Specified by:
        `getSpreadsheetVersion` in interface `FormulaParsingWorkbook`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.