Interface ExcelTemplateService

All Known Implementing Classes:
DefaultExcelTemplateService

@Deprecated(since="1808", forRemoval=true) public interface ExcelTemplateService
Deprecated, for removal: This API element is subject to removal in a future version.
since 1808. This service was split for 4 separated services:
Service responsible for operation on excel file.
  • Method Details

    • createWorkbook

      org.apache.poi.ss.usermodel.Workbook createWorkbook(InputStream is)
      Deprecated.
      Creates workbook object based on inputStream of excel file. If inputStream doesn't contains excel file then new empty Workbook will be returned.
      Parameters:
      is - Input stream of excel file
      Returns:
      Workbook object which represents excel file
    • getTypeSystemSheet

      org.apache.poi.ss.usermodel.Sheet getTypeSystemSheet(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated.
      Returns sheet which contains metadata about type system
      Parameters:
      workbook - Workbook object which represents excel file
      Returns:
      Sheet which contains information about type system
    • getSheetsNames

      List<String> getSheetsNames(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated.
      Returns all sheets names except utility sheets.
      Parameters:
      workbook - Workbook object which represents excel file
      Returns:
      list of sheets names
    • getSheets

      List<org.apache.poi.ss.usermodel.Sheet> getSheets(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated.
      Returns all sheets except utility sheets.
      Parameters:
      workbook - Workbook object which represents excel file
      Returns:
      list of sheets
    • getCellValue

      String getCellValue(org.apache.poi.ss.usermodel.Cell cell)
      Deprecated.
      since 1808. Use ExcelCellService.getCellValue(Cell) instead
      Returns cell value as a string value. In case when cell contains formula then the formula is evaluated and result of the evaluation is returned.
      Parameters:
      cell - Cell
      Returns:
      string value of cell
    • getHeaders

      List<SelectedAttribute> getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)
      Deprecated.
      Returns list of selected attributes for given sheet, based on metainformation from type system sheet.
      Parameters:
      typeSystemSheet - Sheet contains metainformation about attributes for each type sheets
      typeSheet - Sheet contains data for given sheet
      Returns:
      list of selected attributes
    • getSelectedAttributesQualifiers

      List<SelectedAttributeQualifier> getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)
      Returns qualifiers of attributes which at selected in the typSheet
      Parameters:
      typeSystemSheet - Sheet contains metainformation about attributes for each type sheets
      typeSheet - Sheet contains data for given sheet
      Returns:
      list of selected attributes.
    • findColumnIndex

      int findColumnIndex(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute)
      Finds column index based on selected attribute. If column doesn't exist then -1 will be returned.
      Parameters:
      typeSystemSheet - - sheet which contains information about type system
      sheet - sheet for current type
      selectedAttribute - attribute for which column index should be found.
      Returns:
      column index for given selected attribute. If column doesn't exist then -1 will be returned.
    • createTypeSheet

      org.apache.poi.ss.usermodel.Sheet createTypeSheet(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated.
      Creates a new type sheet in given workbook. If a sheet with given typeCode already exists, it is returned without creating an extra one.
      Parameters:
      typeCode - a new sheet name
      workbook - workbook which will be extended by a new sheet
      Returns:
      sheet
    • findTypeCodeForSheetName

      String findTypeCodeForSheetName(String sheetName, org.apache.poi.ss.usermodel.Workbook workbook)
      Finds type code for given sheet name.
      Parameters:
      sheetName - sheet name.
      workbook - workbook.
      Returns:
      found type code.
    • findSheetNameForTypeCode

      String findSheetNameForTypeCode(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)
      Finds sheet name for given type code.
      Parameters:
      typeCode - type code
      workbook - workbook
      Returns:
      found type code.
    • addTypeSheet

      void addTypeSheet(String typeName, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated.
      Adds a new sheet to given workbook.
      Parameters:
      typeName - a new sheet name.
      workbook - workbook which will be extended by a new sheet
    • insertAttributeHeader

      void insertAttributeHeader(org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute, int columnIndex)
      Inserts value to the sheet's header (first row)
      Parameters:
      sheet - where the value will be inserted
      selectedAttribute - a pojo which allows to retrieve value to insert
      columnIndex - index of a column for inserted value
    • insertAttributesHeader

      void insertAttributesHeader(org.apache.poi.ss.usermodel.Sheet sheet, Collection<SelectedAttribute> selectedAttributes)
      A shortcut for insertAttributeHeader(Sheet, SelectedAttribute, int) It is possible to inserts all values to the header at once instead of invoking insertAttributeHeader(Sheet, SelectedAttribute, int) for every attribute separately
      Parameters:
      sheet - where the value will be inserted
      selectedAttributes - a pojo which allows to retrieve value to insert
    • insertAttributeValue

      void insertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, Object object)
      Deprecated.
      Inserts given value to a given cell
      Parameters:
      cell - where the value will be inserted
      object - a value to insert
    • createEmptyRow

      org.apache.poi.ss.usermodel.Row createEmptyRow(org.apache.poi.ss.usermodel.Sheet sheet)
      Deprecated.
      Creates an empty row in given sheet.
      Parameters:
      sheet - where the row will be created
      Returns:
      row
    • getAttributeDisplayName

      String getAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, String isoCode)
      Returns displayed header name based on attribute descriptor
      Parameters:
      attributeDescriptorModel - attribute descriptor of selected attribute
      isoCode - - isoCode of language
      Returns:
      displayed header name based on attribute descriptor