Interface ExcelHeaderService

    • Method Detail

      • getHeaders

        java.util.Collection<SelectedAttribute> getHeaders​(org.apache.poi.ss.usermodel.Sheet metaInformationSheet,
                                                           org.apache.poi.ss.usermodel.Sheet typeSheet)
        Returns list of selected attributes for given sheet, based on metainformation from type system sheet.
        Parameters:
        metaInformationSheet - Sheet contains metaInformation about attributes for each type sheets
        typeSheet - Sheet contains data for given sheet
        Returns:
        collection of selected attributes
      • getHeaderDisplayNames

        java.util.Collection<java.lang.String> getHeaderDisplayNames​(org.apache.poi.ss.usermodel.Sheet sheet)
        Returns list of attribute display names, that is: the contents of the display name row: ExcelTemplateConstants.Header.DISPLAY_NAME
        Parameters:
        sheet - The Sheet from which the display names should be taken
        Returns:
        List of display names for each attribute in the sheet
      • getSelectedAttributesQualifiers

        java.util.Collection<SelectedAttributeQualifier> getSelectedAttributesQualifiers​(org.apache.poi.ss.usermodel.Sheet metaInformationSheet,
                                                                                         org.apache.poi.ss.usermodel.Sheet typeSheet)
        Returns qualifiers of attributes which at selected in the typSheet
        Parameters:
        metaInformationSheet - Sheet contains metaInformation about attributes for each type sheets
        typeSheet - Sheet contains data for given sheet
        Returns:
        collection of selected attributes.
      • insertAttributeHeader

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

        default java.lang.String getHeaderValueWithoutSpecialMarks​(@Nonnull
                                                                   java.lang.String headerValue)
        Removes special characters, defined by ExcelTemplateConstants.SpecialMark, from given input
        Parameters:
        headerValue - input
        Returns:
        headerValue without special marks