Interface XlsReportConfiguration
-
- All Superinterfaces:
CommonExportConfiguration
,ReportExportConfiguration
- All Known Subinterfaces:
OdsReportConfiguration
,XlsMetadataReportConfiguration
,XlsxMetadataReportConfiguration
,XlsxReportConfiguration
- All Known Implementing Classes:
AbstractXlsReportConfiguration
,SimpleOdsReportConfiguration
,SimpleXlsMetadataReportConfiguration
,SimpleXlsReportConfiguration
,SimpleXlsxMetadataReportConfiguration
,SimpleXlsxReportConfiguration
public interface XlsReportConfiguration extends ReportExportConfiguration
Interface containing settings used by the Excel exporters.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
JRXlsExporter
,JRXlsxExporter
,JROdsExporter
,JRXlsMetadataExporter
-
-
Field Summary
Fields Modifier and Type Field Description static String
FORMAT_PATTERN_PREFIX
Properties havingnet.sf.jasperreports.export.xls.pattern.
prefix are used to store specific Excel format patterns that correspond to their related Java format pattern.static String
PROPERTY_AUTO_FIT_PAGE_HEIGHT
Flag property that provides a default value for theisAutoFitPageHeight()
export setting.static String
PROPERTY_CELL_HIDDEN
This property serves as default for theisCellHidden()
export configuration flag.static String
PROPERTY_CELL_LOCKED
This property serves as default for theisCellLocked()
export configuration flag.static String
PROPERTY_COLLAPSE_ROW_SPAN
Property whose value is used as default state of theisCollapseRowSpan()
export configuration flag.static String
PROPERTY_COLUMN_WIDTH_RATIO
Property used to provide a default value for thegetColumnWidthRatio()
export configuration setting.static String
PROPERTY_DEFINED_NAMES_PREFIX
Property prefix used to identify a set of properties that store defined names for the generated Excel workbook.static String
PROPERTY_DETECT_CELL_TYPE
Property whose value is used as default state of theisDetectCellType()
export flag.static String
PROPERTY_FIRST_PAGE_NUMBER
Property that specifies the default for thegetFirstPageNumber()
exporter configuration setting.static String
PROPERTY_FIT_HEIGHT
This property provides a default for thegetFitHeight()
export configuration setting.static String
PROPERTY_FIT_WIDTH
This property provides a default for thegetFitWidth()
exporter configuration setting.static String
PROPERTY_FONT_SIZE_FIX_ENABLED
Property whose value is used as default state of theisFontSizeFixEnabled()
export configuration flag.static String
PROPERTY_FORCE_PAGE_BREAKS
Flag property that provides a default value for theisForcePageBreaks()
export setting.static String
PROPERTY_FREEZE_COLUMN
This property provides a default for thegetFreezeColumn()
exporter configuration setting.static String
PROPERTY_FREEZE_ROW
This property provides a default for thegetFreezeRow()
exporter configuration setting.static String
PROPERTY_IGNORE_ANCHORS
Property that provides a default for theisIgnoreAnchors()
export configuration flag.static String
PROPERTY_IGNORE_CELL_BACKGROUND
Property whose value is used as default state of theisIgnoreCellBackground()
export flag.static String
PROPERTY_IGNORE_CELL_BORDER
Property whose value is used as default state of theisIgnoreCellBorder()
export configuration flag.static String
PROPERTY_IGNORE_GRAPHICS
Property whose value is used as default state of theisIgnoreGraphics()
export configuration flag.static String
PROPERTY_IGNORE_HYPERLINK
Property that provides a default value for theisIgnoreHyperlink()
export configuration flag.static String
PROPERTY_IGNORE_TEXT_FORMATTING
Property whose value is used as default state of theisIgnoreTextFormatting()
export configuration flag.static String
PROPERTY_IMAGE_ANCHOR_TYPE
Property that provides a default value for thegetImageAnchorType()
export parameter setting.static String
PROPERTY_IMAGE_BORDER_FIX_ENABLED
Property whose value is used as default state of theisImageBorderFixEnabled()
export configuration flag.static String
PROPERTY_MAXIMUM_ROWS_PER_SHEET
Property whose value is used as default of thegetMaxRowsPerSheet()
export configuration setting.static String
PROPERTY_ONE_PAGE_PER_SHEET
Property whose value is used as default state of theisOnePagePerSheet()
export configuration flag.static String
PROPERTY_PAGE_SCALE
This property provides a default value for thegetPageScale()
export configuration setting.static String
PROPERTY_PASSWORD
Property whose value is used as default value of thegetPassword()
export configuration setting.static String
PROPERTY_PRINT_FOOTER_MARGIN
Property used to provide a default value for thegetPrintFooterMargin()
export configuration setting.static String
PROPERTY_PRINT_HEADER_MARGIN
Property used to provide a default value for thegetPrintHeaderMargin()
export configuration setting.static String
PROPERTY_PRINT_PAGE_BOTTOM_MARGIN
Property used to provide a default value for thegetPrintPageBottomMargin()
export configuration setting.static String
PROPERTY_PRINT_PAGE_HEIGHT
Property used to provide a default value for thegetPrintPageHeight()
export configuration setting.static String
PROPERTY_PRINT_PAGE_LEFT_MARGIN
Property used to provide a default value for thegetPrintPageLeftMargin()
export configuration setting.static String
PROPERTY_PRINT_PAGE_RIGHT_MARGIN
Property used to provide a default value for thegetPrintPageRightMargin()
export configuration setting.static String
PROPERTY_PRINT_PAGE_TOP_MARGIN
Property used to provide a default value for thegetPrintPageTopMargin()
export configuration setting.static String
PROPERTY_PRINT_PAGE_WIDTH
Property used to provide a default value for thegetPrintPageWidth()
export configuration setting.static String
PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS
Property whose value is used as default state of theisRemoveEmptySpaceBetweenColumns()
export configuration flag.static String
PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
Property whose value is used as default state of theisRemoveEmptySpaceBetweenRows()
export configuration flag.static String
PROPERTY_SHEET_DIRECTION
This property provides a default for thegetSheetDirection()
exporter configuration setting.static String
PROPERTY_SHEET_FOOTER_CENTER
This property provides a default value for thegetSheetFooterCenter()
export configuration setting.static String
PROPERTY_SHEET_FOOTER_LEFT
This property provides a default value for thegetSheetFooterLeft()
export configuration setting.static String
PROPERTY_SHEET_FOOTER_RIGHT
This property provides a default value for thegetSheetFooterRight()
export configuration setting.static String
PROPERTY_SHEET_HEADER_CENTER
This property provides a default value for thegetSheetHeaderCenter()
export configuration setting.static String
PROPERTY_SHEET_HEADER_LEFT
This property provides a default value for thegetSheetHeaderLeft()
export configuration setting.static String
PROPERTY_SHEET_HEADER_RIGHT
This property provides a default value for thegetSheetHeaderRight()
export configuration setting.static String
PROPERTY_SHEET_NAMES_PREFIX
Prefix used to identify properties holding sheet names.static String
PROPERTY_SHEET_TAB_COLOR
Property whose value is used as default state of thegetSheetTabColor()
export configuration setting.static String
PROPERTY_SHOW_GRIDLINES
Property that provides a default for theisShowGridLines()
export configuration flag.static String
PROPERTY_SHRINK_TO_FIT
This flag property serves as default for theisShrinkToFit()
export configuration flag.static String
PROPERTY_USE_TIMEZONE
Property that provides a default for theisUseTimeZone()
export configuration flag.static String
PROPERTY_WHITE_PAGE_BACKGROUND
Property whose value is used as default state of theisWhitePageBackground()
export configuration flag.static String
PROPERTY_WRAP_TEXT
This property serves as default for theisWrapText()
export configuration flag.-
Fields inherited from interface net.sf.jasperreports.export.CommonExportConfiguration
PROPERTY_EXPORT_CONFIGURATION_OVERRIDE_REPORT_HINTS
-
Fields inherited from interface net.sf.jasperreports.export.ReportExportConfiguration
PROPERTY_IGNORE_PAGE_MARGINS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.JRPropertiesUtil.PropertySuffix[]
getDefinedNames()
Returns an array of strings representing defined names in the generated workbook.Integer
getFirstPageNumber()
Setting that specifies the first page number in the page setup dialog.Integer
getFitHeight()
This setting indicates the number of pages height to fit the sheet in.Integer
getFitWidth()
This setting indicates the number of pages wide to fit the sheet in.Map<String,String>
getFormatPatternsMap()
This export configuration setting should be used when converting java format patterns to equivalent proprietary format patterns.String
getFreezeColumn()
Indicates the name of the first unlocked column in document's sheets.Integer
getFreezeRow()
Specifies the index of the first unlocked row in document's sheets.ImageAnchorTypeEnum
getImageAnchorType()
Specifies the image anchor type.Integer
getMaxRowsPerSheet()
Returns an integer value specifying the maximum number of rows allowed to be shown in a sheet.Integer
getPageScale()
This setting is used to adjust the page content to a given percent of the normal size in the print preview pane.String
getPassword()
Returns a String value representing the password in case of password protected documents.Integer
getPrintFooterMargin()
Specifies the sheet footer margin in print preview pane, measured in pixels.Integer
getPrintHeaderMargin()
Specifies the sheet header margin in print preview pane, measured in pixels.Integer
getPrintPageBottomMargin()
Specifies the page bottom margin in print preview pane, measured in pixels.Integer
getPrintPageHeight()
Specifies the page height in print preview pane, measured in pixels.Integer
getPrintPageLeftMargin()
Specifies the page left margin in print preview pane, measured in pixels.Integer
getPrintPageRightMargin()
Specifies the page right margin in print preview pane, measured in pixels.Integer
getPrintPageTopMargin()
Specifies the page top margin in print preview pane, measured in pixels.Integer
getPrintPageWidth()
Specifies the page width in print preview pane, measured in pixels.RunDirectionEnum
getSheetDirection()
This setting indicates if the sheet is left-to-right or right-to-left oriented.String
getSheetFooterCenter()
This property stores the text content of the sheet footer's center.String
getSheetFooterLeft()
This property stores the text content of the sheet footer's left side.String
getSheetFooterRight()
This property stores the text content of the sheet footer's right side.String
getSheetHeaderCenter()
This property stores the text content of the sheet header's center.String
getSheetHeaderLeft()
This property stores the text content of the sheet header's left side.String
getSheetHeaderRight()
This property stores the text content of the sheet header's right side.String[]
getSheetNames()
Returns an array of strings representing custom sheet names.Color
getSheetTabColor()
This setting is used to set the tab color of the sheets.Boolean
isAutoFitPageHeight()
Flag that specifies whether the fit height should be estimated automatically.Boolean
isAutoFitRow()
Boolean
isCellHidden()
This flag indicates whether the cell content is hidden.Boolean
isCellLocked()
This flag indicates whether the cell is locked.Boolean
isCollapseRowSpan()
Flag for collapsing row span and avoid merging cells across rows.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.Boolean
isFontSizeFixEnabled()
Flag for decreasing font size so that texts fit into the specified cell height.Boolean
isForcePageBreaks()
Flag that specifies whether the page breaks to be marked automatically on each sheet.Boolean
isIgnoreAnchors()
Flag that indicates whether local anchors should be ignored when elements are exported to Excel.Boolean
isIgnoreCellBackground()
Flag for ignoring the cell background color.Boolean
isIgnoreCellBorder()
Flag for ignoring the cell border.Boolean
isIgnoreGraphics()
Flag for ignoring graphic elements and exporting text elements only.Boolean
isIgnoreHyperlink()
Boolean
isIgnorePageMargins()
Indicates whether page margins should be ignored when the report is exported using a grid-based exporterBoolean
isIgnoreTextFormatting()
Flag that indicates whether the text elements should be exported without text formatting features, such as bold, italic, underline, text color, backcolor, etc.Boolean
isImageBorderFixEnabled()
Flag for forcing the minimum image padding to 1 pixel, to avoid situations where the image hides the cell border.Boolean
isOnePagePerSheet()
Returns a boolean value specifying whether each report page should be written in a different XLS sheet.Boolean
isRemoveEmptySpaceBetweenColumns()
Returns a boolean value specifying whether the empty spaces that could appear between columns should be removed or not.Boolean
isRemoveEmptySpaceBetweenRows()
Returns a boolean value specifying whether the empty spaces that could appear between rows should be removed or not.Boolean
isShowGridLines()
Flag that specifies if the gridlines in a given sheet are shown.Boolean
isShrinkToFit()
Flag that indicates whether the text font size should be decreased in order to keep the entire text visible in the cell.Boolean
isUseTimeZone()
Flag that determines whether date values are to be translated to the timezone that was used to fill the report.Boolean
isWhitePageBackground()
Returns a boolean value specifying whether the page background should be white or the default XLS background color.Boolean
isWrapText()
This flag indicates whether text wrapping is allowed in a given cell.-
Methods inherited from interface net.sf.jasperreports.export.CommonExportConfiguration
isOverrideHints
-
Methods inherited from interface net.sf.jasperreports.export.ReportExportConfiguration
getEndPageIndex, getExporterFilter, getHyperlinkProducerFactory, getOffsetX, getOffsetY, getPageIndex, getProgressMonitor, getStartPageIndex
-
-
-
-
Field Detail
-
PROPERTY_ONE_PAGE_PER_SHEET
static final String PROPERTY_ONE_PAGE_PER_SHEET
Property whose value is used as default state of theisOnePagePerSheet()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
static final String PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
Property whose value is used as default state of theisRemoveEmptySpaceBetweenRows()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS
static final String PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS
Property whose value is used as default state of theisRemoveEmptySpaceBetweenColumns()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_WHITE_PAGE_BACKGROUND
static final String PROPERTY_WHITE_PAGE_BACKGROUND
Property whose value is used as default state of theisWhitePageBackground()
export configuration flag. This property is set by default (true
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_WRAP_TEXT
static final String PROPERTY_WRAP_TEXT
This property serves as default for theisWrapText()
export configuration flag.The property itself defaults to
true
.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_CELL_LOCKED
static final String PROPERTY_CELL_LOCKED
This property serves as default for theisCellLocked()
export configuration flag.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_CELL_HIDDEN
static final String PROPERTY_CELL_HIDDEN
This property serves as default for theisCellHidden()
export configuration flag.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_DETECT_CELL_TYPE
static final String PROPERTY_DETECT_CELL_TYPE
Property whose value is used as default state of theisDetectCellType()
export flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_FONT_SIZE_FIX_ENABLED
static final String PROPERTY_FONT_SIZE_FIX_ENABLED
Property whose value is used as default state of theisFontSizeFixEnabled()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_IMAGE_BORDER_FIX_ENABLED
static final String PROPERTY_IMAGE_BORDER_FIX_ENABLED
Property whose value is used as default state of theisImageBorderFixEnabled()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_IGNORE_GRAPHICS
static final String PROPERTY_IGNORE_GRAPHICS
Property whose value is used as default state of theisIgnoreGraphics()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_COLLAPSE_ROW_SPAN
static final String PROPERTY_COLLAPSE_ROW_SPAN
Property whose value is used as default state of theisCollapseRowSpan()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_IGNORE_CELL_BORDER
static final String PROPERTY_IGNORE_CELL_BORDER
Property whose value is used as default state of theisIgnoreCellBorder()
export configuration flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_IGNORE_CELL_BACKGROUND
static final String PROPERTY_IGNORE_CELL_BACKGROUND
Property whose value is used as default state of theisIgnoreCellBackground()
export flag. This property is by default not set (false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_MAXIMUM_ROWS_PER_SHEET
static final String PROPERTY_MAXIMUM_ROWS_PER_SHEET
Property whose value is used as default of thegetMaxRowsPerSheet()
export configuration setting. This property is by default to zero.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_HEADER_LEFT
static final String PROPERTY_SHEET_HEADER_LEFT
This property provides a default value for thegetSheetHeaderLeft()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_HEADER_CENTER
static final String PROPERTY_SHEET_HEADER_CENTER
This property provides a default value for thegetSheetHeaderCenter()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_HEADER_RIGHT
static final String PROPERTY_SHEET_HEADER_RIGHT
This property provides a default value for thegetSheetHeaderRight()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_FOOTER_LEFT
static final String PROPERTY_SHEET_FOOTER_LEFT
This property provides a default value for thegetSheetFooterLeft()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_FOOTER_CENTER
static final String PROPERTY_SHEET_FOOTER_CENTER
This property provides a default value for thegetSheetFooterCenter()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_FOOTER_RIGHT
static final String PROPERTY_SHEET_FOOTER_RIGHT
This property provides a default value for thegetSheetFooterRight()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_PASSWORD
static final String PROPERTY_PASSWORD
Property whose value is used as default value of thegetPassword()
export configuration setting. This property is by default not set (null
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_NAMES_PREFIX
static final String PROPERTY_SHEET_NAMES_PREFIX
Prefix used to identify properties holding sheet names. Such properties are useful when defining sheet names in the JRXML template is required. The property values are collected in an ordered list, therefore the order in which the properties appear in the report is important. If set, the values are used as defaults for thegetSheetNames()
export configuration setting. A property starting with this prefix can hold one or several sheet names, separated by a slash character ("/"). By default no sheet name properties are set.- See Also:
JRPropertiesUtil
, Constant Field Values
-
FORMAT_PATTERN_PREFIX
static final String FORMAT_PATTERN_PREFIX
Properties havingnet.sf.jasperreports.export.xls.pattern.
prefix are used to store specific Excel format patterns that correspond to their related Java format pattern. The{arbitrary_pattern}
suffix represents the Java pattern and the property value is the related Excel pattern. When these properties are defined in a JRXML report design, special characters should be XML-escaped. When they are defined in a properties file, one should also escape special characters. If some properties are defined in the report, they will override the context properties.- See Also:
- Constant Field Values
-
PROPERTY_IGNORE_HYPERLINK
static final String PROPERTY_IGNORE_HYPERLINK
Property that provides a default value for theisIgnoreHyperlink()
export configuration flag.- See Also:
- Constant Field Values
-
PROPERTY_IGNORE_ANCHORS
static final String PROPERTY_IGNORE_ANCHORS
Property that provides a default for theisIgnoreAnchors()
export configuration flag. The default value isfalse
.Property scope:
Global
Report
- See Also:
- Constant Field Values
-
PROPERTY_FIT_WIDTH
static final String PROPERTY_FIT_WIDTH
This property provides a default for thegetFitWidth()
exporter configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_FIT_HEIGHT
static final String PROPERTY_FIT_HEIGHT
This property provides a default for thegetFitHeight()
export configuration setting.- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_PAGE_SCALE
static final String PROPERTY_PAGE_SCALE
This property provides a default value for thegetPageScale()
export configuration setting.
Property scope:Global
Report
Element
- this setting can be used to set the page scale per sheet
- See Also:
- Constant Field Values
-
PROPERTY_SHEET_DIRECTION
static final String PROPERTY_SHEET_DIRECTION
This property provides a default for thegetSheetDirection()
exporter configuration setting.- See Also:
- Constant Field Values
-
PROPERTY_FREEZE_ROW
static final String PROPERTY_FREEZE_ROW
This property provides a default for thegetFreezeRow()
exporter configuration setting. Allowed values are represented by positive integers in the 1..65536 range. Negative values are not considered. The property should be used when all sheets in the document have the same freeze row index.- See Also:
- Constant Field Values
-
PROPERTY_FREEZE_COLUMN
static final String PROPERTY_FREEZE_COLUMN
This property provides a default for thegetFreezeColumn()
exporter configuration setting. Allowed values are letters or letter combinations representing valid column names in Excel, such as A, B, AB, AC, etc. The property should be used when all document sheets have the same freeze column name.- See Also:
- Constant Field Values
-
PROPERTY_COLUMN_WIDTH_RATIO
static final String PROPERTY_COLUMN_WIDTH_RATIO
Property used to provide a default value for thegetColumnWidthRatio()
export configuration setting. The property can be set:- globally - then all the columns in all documents exported to the Excel output format will be adjusted with the same width ratio
- at report level - then all the columns in the document will be adjusted with the same width ratio
- at element level - then all the columns in the current sheet will be adjusted with the same width ratio
PROPERTY_COLUMN_WIDTH
property will override thePROPERTY_COLUMN_WIDTH_RATIO
value for that column only.
-
PROPERTY_USE_TIMEZONE
static final String PROPERTY_USE_TIMEZONE
Property that provides a default for theisUseTimeZone()
export configuration flag. The property can be set globally, at report level and at element level. The default value isfalse
.- Since:
- 4.5.0
- See Also:
- Constant Field Values
-
PROPERTY_FIRST_PAGE_NUMBER
static final String PROPERTY_FIRST_PAGE_NUMBER
Property that specifies the default for thegetFirstPageNumber()
exporter configuration setting.
Property scope:Global
Report
Element
- this setting can be used to set the first page number per sheet.
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHOW_GRIDLINES
static final String PROPERTY_SHOW_GRIDLINES
Property that provides a default for theisShowGridLines()
export configuration flag. When set at report element level and multiple elements in a sheet provide this property, the last read value will be considered. Default value istrue
.
Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_IMAGE_ANCHOR_TYPE
static final String PROPERTY_IMAGE_ANCHOR_TYPE
Property that provides a default value for thegetImageAnchorType()
export parameter setting. Possible values are:MoveSize
- images move and size with cellsMoveNoSize
- images move but don't size with cellsNoMoveNoSize
- images don't move or size with cells
MoveNoSize
.
Property scope:Global
Report
Element
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_AUTO_FIT_PAGE_HEIGHT
static final String PROPERTY_AUTO_FIT_PAGE_HEIGHT
Flag property that provides a default value for theisAutoFitPageHeight()
export setting. If set to true, the exporter will automatically fit the print height of a sheet to the number of JasperPrint pages exported in that sheet
Property scope:Global
Report
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_FORCE_PAGE_BREAKS
static final String PROPERTY_FORCE_PAGE_BREAKS
Flag property that provides a default value for theisForcePageBreaks()
export setting. If set to true, the exporter will automatically add a page break at the end of each page exported on the current sheet.
Property scope:Global
Report
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHRINK_TO_FIT
static final String PROPERTY_SHRINK_TO_FIT
This flag property serves as default for theisShrinkToFit()
export configuration flag. If set to true, this will automatically disable the wrap text setting for the cell (seeisWrapText()
). Usually this property works in conjunction withnet.sf.jasperreports.print.keep.full.text
, in order to preserve the entire text content at export time. The property itself defaults tofalse
. Property scope:Global
Report
Element
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_IGNORE_TEXT_FORMATTING
static final String PROPERTY_IGNORE_TEXT_FORMATTING
Property whose value is used as default state of theisIgnoreTextFormatting()
export configuration flag. If true, text elements will be exported without formatting features such as bold, underline, backcolor, text color, etc. Property scope:Global
Report
Element
false
).- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_SHEET_TAB_COLOR
static final String PROPERTY_SHEET_TAB_COLOR
Property whose value is used as default state of thegetSheetTabColor()
export configuration setting. When set at report element level and multiple elements in a sheet provide this property, the last read value will be considered. The property works in XLSX and ODS output formats. It is not supported by the XLS output format. Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
- See Also:
JRPropertiesUtil
, Constant Field Values
-
PROPERTY_PRINT_PAGE_TOP_MARGIN
static final String PROPERTY_PRINT_PAGE_TOP_MARGIN
Property used to provide a default value for thegetPrintPageTopMargin()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_PAGE_LEFT_MARGIN
static final String PROPERTY_PRINT_PAGE_LEFT_MARGIN
Property used to provide a default value for thegetPrintPageLeftMargin()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_PAGE_BOTTOM_MARGIN
static final String PROPERTY_PRINT_PAGE_BOTTOM_MARGIN
Property used to provide a default value for thegetPrintPageBottomMargin()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_PAGE_RIGHT_MARGIN
static final String PROPERTY_PRINT_PAGE_RIGHT_MARGIN
Property used to provide a default value for thegetPrintPageRightMargin()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_PAGE_HEIGHT
static final String PROPERTY_PRINT_PAGE_HEIGHT
Property used to provide a default value for thegetPrintPageHeight()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_PAGE_WIDTH
static final String PROPERTY_PRINT_PAGE_WIDTH
Property used to provide a default value for thegetPrintPageWidth()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_HEADER_MARGIN
static final String PROPERTY_PRINT_HEADER_MARGIN
Property used to provide a default value for thegetPrintHeaderMargin()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_PRINT_FOOTER_MARGIN
static final String PROPERTY_PRINT_FOOTER_MARGIN
Property used to provide a default value for thegetPrintFooterMargin()
export configuration setting. The property can be set: Property scope:Global
Report
Element
- this setting can be used to set the property value per sheet.
-
PROPERTY_DEFINED_NAMES_PREFIX
static final String PROPERTY_DEFINED_NAMES_PREFIX
Property prefix used to identify a set of properties that store defined names for the generated Excel workbook. Each property suffix serves as name identifier and should be in accordance with the following rules:- the first character in a name should be a letter, an underscore or a backslash
- the remaining characters may be letters, digits, periods or underscores; spaces are not allowed
- a name cannot represent a cell reference (names like
"A10"
,"$A$10"
or"R2C5"
are invalid) - a name cannot exceed 255 characters
- names are not case sensitive:
"name1"
,"Name1"
and"NAME1"
represent the same name - a name identifier should be unique within a given report, in order to be properly collected at export time
"|"
) sign:- the first part, which is mandatory, may represent:
- a cell reference in a given sheet (such as
"Sheet_1!$A$10"
,"Sheet_1!A10"
, or"'Sheet 1'!$A$10"
); the"A10"
cell reference is relative, while"$A$10"
is absolute - a cell range reference in a given sheet (such as
"Sheet_1!A10:C20"
,"Sheet_1!$A$10:$C$20"
,"'Sheet 1'!$A$10:$C$20"
) - a formula (such as
"SUM('Sheet 1'!$A$10:$C$20)"
)
- a cell reference in a given sheet (such as
- an optional second part represents the scope for the defined name. It can be either a sheet name,
or the
"workbook"
literal constant, representing the entire workbook. In case this second part is missing, the scope associated by default will be the entire workbook.
<property name="net.sf.jasperreports.export.xls.defined.names.test_sum" value="SUM(Sheet_1!$A$10:$C$20)|SecondSheet"/>
"test_sum"
, is visible only in a sheet named"SecondSheet"
and is associated with a formula that calculates a sum over the cell range[$A$10:$C$20]
belonging to a sheet named"Sheet_1"
.<property name="net.sf.jasperreports.export.xls.defined.names.test_range" value="'Sheet 1'!$A$10:$C$20"/>
"test_range"
, is visible in the entire workbook and is associated with the cell range[$A$10:$C$20]
in the sheet named"Sheet 1"
.<property name="net.sf.jasperreports.export.xls.defined.names.test_sum_1" value="SUM(Sheet_1!$A$10:$C$20)|Sheet_1"/>
<property name="net.sf.jasperreports.export.xls.defined.names.test_sum_all" value="Sheet_1!test_sum_1"/>
test_sum_1
is visible only in the sheet namedSheet_1
. The nametest_sum_all
is visible in the entire workbook and refers to the nametest_sum_1
defined forSheet_1
. Note: Names that reference other names with limited visibility/scope (like the abovetest_sum_all
) are NOT supported for the XLS (Excel 2003) export format. They work only in the XLSX (Excel 2007 or newer) exporter.
-
-
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.
-
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
-
isFontSizeFixEnabled
Boolean isFontSizeFixEnabled()
Flag for decreasing font size so that texts fit into the specified cell height.- See Also:
PROPERTY_FONT_SIZE_FIX_ENABLED
-
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
-
isIgnoreGraphics
Boolean isIgnoreGraphics()
Flag for ignoring graphic elements and exporting text elements only.- See Also:
PROPERTY_IGNORE_GRAPHICS
-
isCollapseRowSpan
Boolean isCollapseRowSpan()
Flag for collapsing row span and avoid merging cells across rows.- See Also:
PROPERTY_COLLAPSE_ROW_SPAN
-
isIgnoreCellBorder
Boolean isIgnoreCellBorder()
Flag for ignoring the cell border.- See Also:
PROPERTY_IGNORE_CELL_BORDER
-
isIgnoreCellBackground
Boolean isIgnoreCellBackground()
Flag for ignoring the cell background color.- See Also:
PROPERTY_IGNORE_CELL_BACKGROUND
-
isWrapText
Boolean isWrapText()
This flag indicates whether text wrapping is allowed in a given cell.- See Also:
PROPERTY_WRAP_TEXT
-
isCellLocked
Boolean isCellLocked()
This flag indicates whether the cell is locked.- See Also:
PROPERTY_CELL_LOCKED
-
isCellHidden
Boolean isCellHidden()
This flag indicates whether the cell content is hidden.- See Also:
PROPERTY_CELL_HIDDEN
-
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 exporterIf set to
true
, any page in the document will be exported without taking into account its margins.
-
getSheetHeaderLeft
String getSheetHeaderLeft()
This property stores the text content of the sheet header's left side.- See Also:
PROPERTY_SHEET_HEADER_LEFT
-
getSheetHeaderCenter
String getSheetHeaderCenter()
This property stores the text content of the sheet header's center.- See Also:
PROPERTY_SHEET_HEADER_CENTER
-
getSheetHeaderRight
String getSheetHeaderRight()
This property stores the text content of the sheet header's right side.- See Also:
PROPERTY_SHEET_HEADER_RIGHT
-
getSheetFooterLeft
String getSheetFooterLeft()
This property stores the text content of the sheet footer's left side.- See Also:
PROPERTY_SHEET_FOOTER_LEFT
-
getSheetFooterCenter
String getSheetFooterCenter()
This property stores the text content of the sheet footer's center.- See Also:
PROPERTY_SHEET_FOOTER_CENTER
-
getSheetFooterRight
String getSheetFooterRight()
This property stores the text content of the sheet footer's right side.- See Also:
PROPERTY_SHEET_FOOTER_RIGHT
-
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
-
isIgnoreHyperlink
Boolean isIgnoreHyperlink()
- See Also:
PROPERTY_IGNORE_HYPERLINK
-
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 thegetFitWidth()
andgetFitHeight()
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
- 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
-
getFirstPageNumber
Integer getFirstPageNumber()
Setting that specifies the first page number in the page setup dialog.- See Also:
PROPERTY_FIRST_PAGE_NUMBER
-
isShowGridLines
Boolean isShowGridLines()
Flag that specifies if the gridlines in a given sheet are shown.- See Also:
PROPERTY_SHOW_GRIDLINES
-
getImageAnchorType
ImageAnchorTypeEnum getImageAnchorType()
Specifies the image anchor type.- See Also:
PROPERTY_IMAGE_ANCHOR_TYPE
-
isAutoFitPageHeight
Boolean isAutoFitPageHeight()
Flag that specifies whether the fit height should be estimated automatically.- See Also:
PROPERTY_AUTO_FIT_PAGE_HEIGHT
-
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 (seeisWrapText()
). Usually this setting works in conjunction withnet.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.
-
getDefinedNames
JRPropertiesUtil.PropertySuffix[] getDefinedNames()
Returns an array of strings representing defined names in the generated workbook.- See Also:
PROPERTY_DEFINED_NAMES_PREFIX
-
isAutoFitRow
Boolean isAutoFitRow()
-
-