Interface XlsReportConfiguration

    • Method Detail

      • isOnePagePerSheet

        Boolean isOnePagePerSheet()
        Returns a boolean value specifying whether each report page should be written in a different XLS sheet.
        See Also:
        PROPERTY_ONE_PAGE_PER_SHEET
      • isRemoveEmptySpaceBetweenRows

        Boolean isRemoveEmptySpaceBetweenRows()
        Returns a boolean value specifying whether the empty spaces that could appear between rows should be removed or not.
        See Also:
        PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
      • isRemoveEmptySpaceBetweenColumns

        Boolean isRemoveEmptySpaceBetweenColumns()
        Returns a boolean value specifying whether the empty spaces that could appear between columns should be removed or not.
        See Also:
        PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS
      • isWhitePageBackground

        Boolean isWhitePageBackground()
        Returns a boolean value specifying whether the page background should be white or the default XLS background color. This background may vary depending on the XLS viewer properties or the operating system color scheme.
        See Also:
        PROPERTY_WHITE_PAGE_BACKGROUND
      • isDetectCellType

        Boolean isDetectCellType()
        Flag used to indicate whether the exporter should take into consideration the type of the original text field expressions and set the cell types and values accordingly.

        Text fields having numerical or date expressions save type and formatting (format pattern, locale and time zone) information in the JasperPrint/JRPrintText object created by the report fill process.

        When this flag is set, the exporter will parse back the String value of numerical/date texts. Numerical/date cells will be created and the original pattern of the text will be included as part of the cell style.

        Note that this mechanism would not work when the text field overflows and splits on two pages/columns. Also, it is required that the text field expression has a numerical or date type set.

        This flag is off by default to ensure backwards compatibility.

        See Also:
        PROPERTY_DETECT_CELL_TYPE
      • isImageBorderFixEnabled

        Boolean isImageBorderFixEnabled()
        Flag for forcing the minimum image padding to 1 pixel, to avoid situations where the image hides the cell border.
        See Also:
        PROPERTY_IMAGE_BORDER_FIX_ENABLED
      • isWrapText

        Boolean isWrapText()
        This flag indicates whether text wrapping is allowed in a given cell.
        See Also:
        PROPERTY_WRAP_TEXT
      • getMaxRowsPerSheet

        Integer getMaxRowsPerSheet()
        Returns an integer value specifying the maximum number of rows allowed to be shown in a sheet. When set, a new sheet is created for the remaining rows to be displayed. Negative values or zero means that no limit has been set.
        See Also:
        PROPERTY_MAXIMUM_ROWS_PER_SHEET
      • isIgnorePageMargins

        Boolean isIgnorePageMargins()
        Indicates whether page margins should be ignored when the report is exported using a grid-based exporter

        If set to true, any page in the document will be exported without taking into account its margins.

        See Also:
        ReportExportConfiguration.PROPERTY_IGNORE_PAGE_MARGINS
      • getPassword

        String getPassword()
        Returns a String value representing the password in case of password protected documents.
        See Also:
        PROPERTY_PASSWORD
      • getSheetNames

        String[] getSheetNames()
        Returns an array of strings representing custom sheet names. This is useful when used with the isOnePagePerSheet() setting.
        See Also:
        PROPERTY_SHEET_NAMES_PREFIX
      • getFormatPatternsMap

        Map<String,​String> getFormatPatternsMap()
        This export configuration setting should be used when converting java format patterns to equivalent proprietary format patterns. It should be constructed as a Map containing java format patterns as keys and the correspondent proprietary format pattern as correspondent value

        See Also:
        HSSFDataFormat
      • isIgnoreAnchors

        Boolean isIgnoreAnchors()
        Flag that indicates whether local anchors should be ignored when elements are exported to Excel.
        See Also:
        PROPERTY_IGNORE_ANCHORS
      • getFitWidth

        Integer getFitWidth()
        This setting indicates the number of pages wide to fit the sheet in.
        See Also:
        PROPERTY_FIT_WIDTH
      • getFitHeight

        Integer getFitHeight()
        This setting indicates the number of pages height to fit the sheet in.
        See Also:
        PROPERTY_FIT_WIDTH
      • getPageScale

        Integer getPageScale()
        This setting is used to adjust the page content to a given percent of the normal size in the print preview pane. Allowed values are positive integers from 10 to 400, representing percents of the normal size. This setting overrides the getFitWidth() and getFitHeight() settings.
        See Also:
        PROPERTY_PAGE_SCALE
      • getSheetDirection

        RunDirectionEnum getSheetDirection()
        This setting indicates if the sheet is left-to-right or right-to-left oriented. Possible values are:
        • LTR - meaning left-to-right
        • RTL - meaning right-to-left
        The default value is LTR.
        See Also:
        PROPERTY_SHEET_DIRECTION
      • getColumnWidthRatio

        Float getColumnWidthRatio()
        Setting used to adjust all column widths in a document or sheet with the same width ratio, in order to get column width values suitable for Excel output. Usually column widths are measured by Excel in Normal style default character width units, while the JR engine uses pixels as default size units. When exporting the report to the Excel output format, the pixel-to-character width translation depends on the normal style default character width provided by the Excel instance, so it cannot be always accurately fitted. In this case, one can alter the generated column widths by setting this property with a float value representing the adjustment ratio.
        See Also:
        PROPERTY_COLUMN_WIDTH_RATIO
      • isUseTimeZone

        Boolean isUseTimeZone()
        Flag that determines whether date values are to be translated to the timezone that was used to fill the report.

        By default, date values are exported to Excel using the default timezone of the system. Setting this to true instructs the exporter to use he report fill timezone to export date values.

        This only has effect when isDetectCellType() is set.

        See Also:
        PROPERTY_USE_TIMEZONE
      • isForcePageBreaks

        Boolean isForcePageBreaks()
        Flag that specifies whether the page breaks to be marked automatically on each sheet.
        See Also:
        PROPERTY_FORCE_PAGE_BREAKS
      • isShrinkToFit

        Boolean isShrinkToFit()
        Flag that indicates whether the text font size should be decreased in order to keep the entire text visible in the cell. If set to true, this will automatically disable the wrap text property (see isWrapText()).

        Usually this setting works in conjunction with net.sf.jasperreports.print.keep.full.text, in order to preserve the entire text content at export time.

        See Also:
        PROPERTY_SHRINK_TO_FIT
      • isIgnoreTextFormatting

        Boolean isIgnoreTextFormatting()
        Flag that indicates whether the text elements should be exported without text formatting features, such as bold, italic, underline, text color, backcolor, etc.

        See Also:
        PROPERTY_IGNORE_TEXT_FORMATTING
      • getSheetTabColor

        Color getSheetTabColor()
        This setting is used to set the tab color of the sheets. Global and report-level settings are overridden by element-level settings for this property. If several elements in a sheet contain this property, the engine will consider the value of the last exported element's property.

        The setting is neglected in XLS export channel (works with XLSX and ODS only)

        See Also:
        PROPERTY_SHEET_TAB_COLOR
      • getFreezeRow

        Integer getFreezeRow()
        Specifies the index of the first unlocked row in document's sheets. All rows above this will be 'frozen'. Allowed values are represented by positive integers in the 1..65536 range. Negative values are not considered.
        See Also:
        PROPERTY_FREEZE_ROW
      • getFreezeColumn

        String getFreezeColumn()
        Indicates the name of the first unlocked column in document's sheets. All columns to the left of this one will be 'frozen'. Allowed values are letters or letter combinations representing valid column names in Excel, such as A, B, AB, AC, etc.
        See Also:
        PROPERTY_FREEZE_COLUMN
      • getPrintPageTopMargin

        Integer getPrintPageTopMargin()
        Specifies the page top margin in print preview pane, measured in pixels. Default value is 0.
      • getPrintPageLeftMargin

        Integer getPrintPageLeftMargin()
        Specifies the page left margin in print preview pane, measured in pixels. Default value is 0.
      • getPrintPageBottomMargin

        Integer getPrintPageBottomMargin()
        Specifies the page bottom margin in print preview pane, measured in pixels. Default value is 0.
      • getPrintPageRightMargin

        Integer getPrintPageRightMargin()
        Specifies the page right margin in print preview pane, measured in pixels. Default value is 0.
      • getPrintPageHeight

        Integer getPrintPageHeight()
        Specifies the page height in print preview pane, measured in pixels.
      • getPrintPageWidth

        Integer getPrintPageWidth()
        Specifies the page width in print preview pane, measured in pixels.
      • getPrintHeaderMargin

        Integer getPrintHeaderMargin()
        Specifies the sheet header margin in print preview pane, measured in pixels. Default value is 0.
      • getPrintFooterMargin

        Integer getPrintFooterMargin()
        Specifies the sheet footer margin in print preview pane, measured in pixels. Default value is 0.