Interface WorkbookLoader

    • Method Detail

      • getWorkbook

        org.apache.poi.ss.usermodel.Workbook getWorkbook()
        Get the workbook. Depending on implementation and isCanUnload() state, when this method is repeatedly called, it can (but mustn't) return different instances of workbook java object.
        Returns:
        loaded workbook
        See Also:
        isCanUnload()
      • getSheetLoader

        SheetLoader getSheetLoader​(int sheetIndex)
        Get the sheet accessor
        Parameters:
        sheetIndex - the sheet index in the workbook
        Returns:
        object that provides access to the specified sheet of current workbook
      • getNumberOfSheets

        int getNumberOfSheets()
        Get number of sheets in current workbook.
        Returns:
        the number of sheets in current workbook
      • isCanUnload

        boolean isCanUnload()

        If true - the workbook can (but mustn't) be unloaded (for example if there is no enough memory). In this case when the getWorkbook() is repeatedly called, it can (but mustn't) return different instances of workbook java object.

        If false - the workbook is not unloaded and getWorkbook() always returns the same Workbook instance.

        Returns:
        the flag that this workbook can or cannot be unloaded.
        See Also:
        setCanUnload(boolean)
      • setCanUnload

        void setCanUnload​(boolean canUnload)
        Set the flag that this workbook can or cannot be unloaded. If workbook cannot be unloaded (for example when we edit the workbook) internal implementation should always keep strong reference to workbook and getWorkbook() always returns the same Workbook instance.
        Parameters:
        canUnload - the flag that this workbook can or cannot be unloaded
        See Also:
        isCanUnload()