Class ExcelAbstractExporter<RC extends XlsReportConfiguration,​C extends XlsExporterConfiguration,​E extends JRExporterContext>

    • Field Detail

      • DEFAULT_DEFINED_NAME_SCOPE_SEPARATOR

        public static final String DEFAULT_DEFINED_NAME_SCOPE_SEPARATOR
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_CANNOT_ADD_CELL

        public static final String EXCEPTION_MESSAGE_KEY_CANNOT_ADD_CELL
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_CANNOT_MERGE_CELLS

        public static final String EXCEPTION_MESSAGE_KEY_CANNOT_MERGE_CELLS
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_CELL_FORMAT_TEMPLATE_ERROR

        public static final String EXCEPTION_MESSAGE_KEY_CELL_FORMAT_TEMPLATE_ERROR
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_COLUMN_INDEX_BEYOND_LIMIT

        public static final String EXCEPTION_MESSAGE_KEY_COLUMN_INDEX_BEYOND_LIMIT
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_LOADED_FONTS_ERROR

        public static final String EXCEPTION_MESSAGE_KEY_LOADED_FONTS_ERROR
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_NEGATIVE_COLUMN_INDEX

        public static final String EXCEPTION_MESSAGE_KEY_NEGATIVE_COLUMN_INDEX
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_ERROR

        public static final String EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_ERROR
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND

        public static final String EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND
        See Also:
        Constant Field Values
      • PROPERTY_CELL_FORMULA

        public static final String PROPERTY_CELL_FORMULA
        Property that stores the formula which has to be applied to a given cell in an excel sheet.
        See Also:
        Constant Field Values
      • PROPERTY_CELL_PATTERN

        public static final String PROPERTY_CELL_PATTERN
        Property that stores the pattern which has to be applied to a given cell in an excel sheet.
        See Also:
        Constant Field Values
      • PROPERTY_SHEET_NAME

        public static final String PROPERTY_SHEET_NAME
        Property used to set the name of the sheet containing a given element. Its value overrides the report-level settings for the sheet name. If several elements in the sheet contain this property, the engine will consider the value of the last exported element's property.
        See Also:
        JRPropertiesUtil, Constant Field Values
      • PROPERTY_FREEZE_ROW_EDGE

        public static final String PROPERTY_FREEZE_ROW_EDGE
        This property indicates the horizontal edge of the freeze pane, relative to the current cell. If set, it overrides the PROPERTY_FREEZE_ROW value. Allowed values are:
        • Top - The current row is the first unlocked row in the sheet. All rows above are 'frozen'.
        • Bottom - The current row is the last 'frozen' row in the sheet. All rows below are unlocked.
        See Also:
        Constant Field Values
      • PROPERTY_FREEZE_COLUMN_EDGE

        public static final String PROPERTY_FREEZE_COLUMN_EDGE
        This property indicates the vertical edge of the freeze pane, relative to the current cell. If set, it overrides the PROPERTY_FREEZE_COLUMN and PROPERTY_FREEZE_SHEET_COLUMNS values. Allowed values are:
        • Left - The current column is the first unlocked column in the sheet. All columns to the left are 'frozen'.
        • Right - The current column is the last 'frozen' column in the sheet. All columns to the right are unlocked.
        See Also:
        Constant Field Values
      • PROPERTY_AUTO_FIT_ROW

        public static final String PROPERTY_AUTO_FIT_ROW
        Flag property that indicates whether Excel should autofit the current row height. Allowed values are:
        • true
        • false - this is the default value.
        Since:
        4.5.1
        See Also:
        JRPropertiesUtil, Constant Field Values
      • PROPERTY_IGNORE_ROW_HEIGHT

        public static final String PROPERTY_IGNORE_ROW_HEIGHT
        Flag property that indicates whether the height of the element should contribute to the current row height calculation. The current row height is given by the tallest element on the row, unless row height auto fit is activated. But in certain cases, the tallest element might span multiple rows and thus its bigger height should not be considered, especially in case of metadata based exports. Allowed values are:
        • true
        • false - this is the default value.
        Since:
        6.20.1
        See Also:
        JRPropertiesUtil, Constant Field Values
      • PROPERTY_AUTO_FIT_COLUMN

        public static final String PROPERTY_AUTO_FIT_COLUMN
        Flag property that indicates whether Excel should autofit the current column width. Allowed values are:
        • true
        • false - this is the default value.
        Since:
        4.5.1
        See Also:
        JRPropertiesUtil, Constant Field Values
      • PROPERTY_AUTO_FILTER

        public static final String PROPERTY_AUTO_FILTER
        This element-level property is used to indicate the boundaries of the autofilter data range in the current sheet. Allowed values are:
        • Start - The current cell will be marked as autofilter heading cell, and column data below/to the right of this cell can be considered as part of the autofilter data range. The starting point of the autofilter data range will be the next cell below the current cell (ie if the current cell reference is B4, the autofilter range will start with the "B5" cell reference: "B5:M20").
          If multiple autofilter Start values are found in the same sheet, only the last one will be considered. If the Start value is present but no End value is found in the sheet, then only the current column will be considered for the data range.
          If the autofilter Start value is set on the same row as the autofilter End value, the data range will include all data below this heading row, placed between the start column and the end column.
        • End - The current cell will be marked as autofilter ending cell, and column data in this cell and above/to the left can be considered as part of the autofilter data range. The ending cell in the data range is the current cell reference (ie if the current cell reference is M20, the autofilter range will end in "M20": "B5:M20"). The heading cell for the current column will be placed in the same column on the row containing the autofilter Start value.
          Caution: If no autofilter Start value is found in the sheet, the autofilter End value will be considered as Start value instead.
          If multiple autofilter End value are found in the same sheet, only the last one will be considered.
          If the autofilter Start value is set on the same row as the autofilter End value, the data range will include all data below this heading row, placed between the start column and the end column.
        See Also:
        JRPropertiesUtil, Constant Field Values
      • PROPERTY_COLUMN_WIDTH

        public static final String PROPERTY_COLUMN_WIDTH
        Element-level property used to adjust the column width to values suitable for Excel output, taking into account that column widths are measured in Excel in Normal style default character width units. The pixel-to-character width translation depends on the default normal style character width, so it cannot be always accurately fitted. In this case, one can adjust the current column width by setting this property with an integer value measured in pixels. The JR engine will perform the pixel-to-character width mapping using this value instead of the element's width attribute.
        If defined, this property will override the PROPERTY_COLUMN_WIDTH_RATIO value for the current column
        See Also:
        XlsReportConfiguration.PROPERTY_COLUMN_WIDTH_RATIO, JRPropertiesUtil, Constant Field Values
      • PROPERTY_AVERAGE_CHAR_WIDTH_FACTOR

        public static final String PROPERTY_AVERAGE_CHAR_WIDTH_FACTOR
        Property specifying the multiplication factor to be used when calculating the column width for auto fit columns on top of the fill-time calculated average char width.
        See Also:
        Constant Field Values
      • PROPERTY_ROW_OUTLINE_LEVEL_PREFIX

        public static final String PROPERTY_ROW_OUTLINE_LEVEL_PREFIX
        Property prefix used to indicate the current outline row level, and when necessary, the ending row of the current outline row group with the given level. The suffix of these properties is associated with the outline level, while the property value indicates if the current row group should continue or should end. The most recommended practice is to use the outline level itself as property suffix, although this is not mandatory. The suffix may take any other string value, but one has to keep in mind that suffixes are used as sorted row level descriptors. For instance, because "aaa" < "bbb", the outline level associated with the "aaa" suffix will be smaller than the level associated with the "bbb" suffix. The most intuitive representation of the row levels uses the row level as property suffix.
        In such a case, the net.sf.jasperreports.export.xls.outline.level.2 property means that its value is correlated with the outline level 2, so the current row belongs to a level 2 row group. Based on Office Open XML specs, allowed values for outline levels are positive integers from 1 to 7.
        The value of this property could be any expression (including null). When such a property occurrence is met, the suffix indicates the outline level for that row. If multiple properties with the same prefix are defined for the same row, the deepest outline level is considered for that row. To end an outline row group one has to set the related outline level property with the End value. This is a special property value instructing the JR engine that the current row group of that level ends on the current row.
        See Also:
        JRPropertiesUtil, Constant Field Values
      • PROPERTY_BREAK_BEFORE_ROW

        public static final String PROPERTY_BREAK_BEFORE_ROW
        Element level property specifying if a sheet will break before the row displaying that element. It is very useful especially when displaying each report's group on a separate sheet is intended.
        See Also:
        Constant Field Values
      • PROPERTY_BREAK_AFTER_ROW

        public static final String PROPERTY_BREAK_AFTER_ROW
        Element level property specifying if a sheet will break after the row displaying that element. It is very useful especially when displaying each report's group on a separate sheet is intended.
        See Also:
        Constant Field Values
      • PROPERTY_COLUMN_WIDTH_METADATA

        public static final String PROPERTY_COLUMN_WIDTH_METADATA
        Element-level property used to adjust the column width to values suitable for Excel metadata output, taking into account that when column headers are included in the report, they come with no available width settings. Also keep in mind that column widths are measured in Excel in Normal style default character width units. The pixel-to-character width translation depends on the default normal style character width, so it cannot be always accurately fitted. In this case, one can adjust the current column width by setting this property with an integer value measured in pixels. The JR engine will perform the pixel-to-character width mapping using this value instead of the element's width attribute.
        If defined, this property will override both the PROPERTY_COLUMN_WIDTH value for the current column and the the element's width attribute
        See Also:
        PROPERTY_COLUMN_WIDTH, JRPropertiesUtil, Constant Field Values
      • sheetNames

        protected String[] sheetNames
      • reportIndex

        protected int reportIndex
      • pageIndex

        protected int pageIndex
      • sheetsBeforeCurrentReport

        protected int sheetsBeforeCurrentReport
      • sheetsBeforeCurrentReportMap

        protected Map<Integer,​Integer> sheetsBeforeCurrentReportMap
      • defaultFont

        protected JRFont defaultFont
      • sheetIndex

        protected int sheetIndex
        Used for counting the total number of sheets.
      • sheetNamesIndex

        protected int sheetNamesIndex
        Used for iterating through sheet names.
      • sheetNamesMap

        protected Map<String,​Integer> sheetNamesMap
        Used when indexing the identical sheet name. Contains sheet names as keys and the number of occurrences of each sheet name as values.
      • autoFilterStart

        protected String autoFilterStart
      • autoFilterEnd

        protected String autoFilterEnd
      • firstPageNotSet

        protected boolean firstPageNotSet
      • keepTemplateSheets

        protected Boolean keepTemplateSheets
      • workbookTemplate

        protected String workbookTemplate
      • invalidCharReplacement

        protected String invalidCharReplacement
      • maxColumnIndex

        protected int maxColumnIndex
      • onePagePerSheet

        protected boolean onePagePerSheet
      • defaultShrinkToFit

        protected boolean defaultShrinkToFit
      • defaultWrapText

        protected boolean defaultWrapText
      • defaultCellLocked

        protected boolean defaultCellLocked
      • defaultCellHidden

        protected boolean defaultCellHidden
      • defaultIgnoreTextFormatting

        protected boolean defaultIgnoreTextFormatting
      • ignoreAnchors

        protected boolean ignoreAnchors
      • defaultIgnoreHyperlink

        protected boolean defaultIgnoreHyperlink
      • detectCellType

        protected boolean detectCellType
      • collapseRowSpan

        protected boolean collapseRowSpan
      • defaultUseTimeZone

        protected boolean defaultUseTimeZone
      • imageBorderFixEnabled

        protected boolean imageBorderFixEnabled