public class AbstractXlsReportConfiguration extends SimpleReportExportConfiguration implements XlsReportConfiguration
PROPERTY_AUTO_FIT_PAGE_HEIGHT, PROPERTY_CELL_HIDDEN, PROPERTY_CELL_LOCKED, PROPERTY_COLLAPSE_ROW_SPAN, PROPERTY_COLUMN_WIDTH_RATIO, PROPERTY_DETECT_CELL_TYPE, PROPERTY_FIRST_PAGE_NUMBER, PROPERTY_FIT_HEIGHT, PROPERTY_FIT_WIDTH, PROPERTY_FONT_SIZE_FIX_ENABLED, PROPERTY_FORCE_PAGE_BREAKS, PROPERTY_FREEZE_COLUMN, PROPERTY_FREEZE_ROW, PROPERTY_IGNORE_ANCHORS, PROPERTY_IGNORE_CELL_BACKGROUND, PROPERTY_IGNORE_CELL_BORDER, PROPERTY_IGNORE_GRAPHICS, PROPERTY_IGNORE_HYPERLINK, PROPERTY_IGNORE_TEXT_FORMATTING, PROPERTY_IMAGE_ANCHOR_TYPE, PROPERTY_IMAGE_BORDER_FIX_ENABLED, PROPERTY_MAXIMUM_ROWS_PER_SHEET, PROPERTY_ONE_PAGE_PER_SHEET, PROPERTY_PAGE_SCALE, PROPERTY_PASSWORD, PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, PROPERTY_SHEET_DIRECTION, PROPERTY_SHEET_FOOTER_CENTER, PROPERTY_SHEET_FOOTER_LEFT, PROPERTY_SHEET_FOOTER_RIGHT, PROPERTY_SHEET_HEADER_CENTER, PROPERTY_SHEET_HEADER_LEFT, PROPERTY_SHEET_HEADER_RIGHT, PROPERTY_SHEET_NAMES_PREFIX, PROPERTY_SHEET_TAB_COLOR, PROPERTY_SHOW_GRIDLINES, PROPERTY_SHRINK_TO_FIT, PROPERTY_USE_TIMEZONE, PROPERTY_WHITE_PAGE_BACKGROUND, PROPERTY_WRAP_TEXT
PROPERTY_IGNORE_PAGE_MARGINS
PROPERTY_EXPORT_CONFIGURATION_OVERRIDE_REPORT_HINTS
Constructor and Description |
---|
AbstractXlsReportConfiguration() |
Modifier and Type | Method and 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.
|
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.
|
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 |
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 exporter
|
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.
|
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.
|
void |
setAutoFitPageHeight(Boolean isAutoFitPageHeight) |
void |
setCellHidden(Boolean isCellHidden) |
void |
setCellLocked(Boolean isCellLocked) |
void |
setCollapseRowSpan(Boolean isCollapseRowSpan) |
void |
setColumnWidthRatio(Float columnWidthRatio) |
void |
setDetectCellType(Boolean isDetectCellType) |
void |
setFirstPageNumber(Integer firstPageNumber) |
void |
setFitHeight(Integer fitHeight) |
void |
setFitWidth(Integer fitWidth) |
void |
setFontSizeFixEnabled(Boolean isFontSizeFixEnabled) |
void |
setForcePageBreaks(Boolean isForcePageBreaks) |
void |
setFormatPatternsMap(Map<String,String> formatPatternsMap) |
void |
setFreezeColumn(String freezeColumn) |
void |
setFreezeRow(Integer freezeRow) |
void |
setIgnoreAnchors(Boolean isIgnoreAnchors) |
void |
setIgnoreCellBackground(Boolean isIgnoreCellBackground) |
void |
setIgnoreCellBorder(Boolean isIgnoreCellBorder) |
void |
setIgnoreGraphics(Boolean isIgnoreGraphics) |
void |
setIgnoreHyperlink(Boolean isIgnoreHyperlink) |
void |
setIgnorePageMargins(Boolean isIgnorePageMargins) |
void |
setIgnoreTextFormatting(Boolean isIgnoreTextFormatting) |
void |
setImageAnchorType(ImageAnchorTypeEnum imageAnchorType) |
void |
setImageBorderFixEnabled(Boolean isImageBorderFixEnabled) |
void |
setMaxRowsPerSheet(Integer maxRowsPerSheet) |
void |
setOnePagePerSheet(Boolean isOnePagePerSheet) |
void |
setPageScale(Integer pageScale) |
void |
setPassword(String password) |
void |
setRemoveEmptySpaceBetweenColumns(Boolean isRemoveEmptySpaceBetweenColumns) |
void |
setRemoveEmptySpaceBetweenRows(Boolean isRemoveEmptySpaceBetweenRows) |
void |
setSheetDirection(RunDirectionEnum sheetDirection) |
void |
setSheetFooterCenter(String sheetFooterCenter) |
void |
setSheetFooterLeft(String sheetFooterLeft) |
void |
setSheetFooterRight(String sheetFooterRight) |
void |
setSheetHeaderCenter(String sheetHeaderCenter) |
void |
setSheetHeaderLeft(String sheetHeaderLeft) |
void |
setSheetHeaderRight(String sheetHeaderRight) |
void |
setSheetNames(String[] sheetNames) |
void |
setSheetTabColor(Color tabColor) |
void |
setShowGridLines(Boolean isShowGridLines) |
void |
setShrinkToFit(Boolean isShrinkToFit) |
void |
setUseTimeZone(Boolean isUseTimeZone) |
void |
setWhitePageBackground(Boolean isWhitePageBackground) |
void |
setWrapText(Boolean isWrapText) |
getEndPageIndex, getExporterFilter, getHyperlinkProducerFactory, getOffsetX, getOffsetY, getPageIndex, getProgressMonitor, getStartPageIndex, setEndPageIndex, setExporterFilter, setHyperlinkProducerFactory, setOffsetX, setOffsetY, setPageIndex, setProgressMonitor, setStartPageIndex
isOverrideHints, setOverrideHints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEndPageIndex, getExporterFilter, getHyperlinkProducerFactory, getOffsetX, getOffsetY, getPageIndex, getProgressMonitor, getStartPageIndex
isOverrideHints
public Boolean isOnePagePerSheet()
XlsReportConfiguration
isOnePagePerSheet
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_ONE_PAGE_PER_SHEET
public void setOnePagePerSheet(Boolean isOnePagePerSheet)
public Boolean isRemoveEmptySpaceBetweenColumns()
XlsReportConfiguration
isRemoveEmptySpaceBetweenColumns
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS
public void setRemoveEmptySpaceBetweenColumns(Boolean isRemoveEmptySpaceBetweenColumns)
public Boolean isRemoveEmptySpaceBetweenRows()
XlsReportConfiguration
isRemoveEmptySpaceBetweenRows
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
public void setRemoveEmptySpaceBetweenRows(Boolean isRemoveEmptySpaceBetweenRows)
public Boolean isWhitePageBackground()
XlsReportConfiguration
isWhitePageBackground
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_WHITE_PAGE_BACKGROUND
public void setWhitePageBackground(Boolean isWhitePageBackground)
public Boolean isDetectCellType()
XlsReportConfiguration
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.
isDetectCellType
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_DETECT_CELL_TYPE
public void setDetectCellType(Boolean isDetectCellType)
public Boolean isFontSizeFixEnabled()
XlsReportConfiguration
isFontSizeFixEnabled
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FONT_SIZE_FIX_ENABLED
public void setFontSizeFixEnabled(Boolean isFontSizeFixEnabled)
public Boolean isImageBorderFixEnabled()
XlsReportConfiguration
isImageBorderFixEnabled
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IMAGE_BORDER_FIX_ENABLED
public void setImageBorderFixEnabled(Boolean isImageBorderFixEnabled)
public Boolean isIgnoreGraphics()
XlsReportConfiguration
isIgnoreGraphics
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IGNORE_GRAPHICS
public void setIgnoreGraphics(Boolean isIgnoreGraphics)
public Boolean isCollapseRowSpan()
XlsReportConfiguration
isCollapseRowSpan
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_COLLAPSE_ROW_SPAN
public void setCollapseRowSpan(Boolean isCollapseRowSpan)
public Boolean isIgnoreCellBorder()
XlsReportConfiguration
isIgnoreCellBorder
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IGNORE_CELL_BORDER
public void setIgnoreCellBorder(Boolean isIgnoreCellBorder)
public Boolean isIgnoreCellBackground()
XlsReportConfiguration
isIgnoreCellBackground
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IGNORE_CELL_BACKGROUND
public void setIgnoreCellBackground(Boolean isIgnoreCellBackground)
public Boolean isWrapText()
XlsReportConfiguration
isWrapText
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_WRAP_TEXT
public void setWrapText(Boolean isWrapText)
public Boolean isCellLocked()
XlsReportConfiguration
isCellLocked
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_CELL_LOCKED
public void setCellLocked(Boolean isCellLocked)
public Boolean isCellHidden()
XlsReportConfiguration
isCellHidden
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_CELL_HIDDEN
public void setCellHidden(Boolean isCellHidden)
public Integer getMaxRowsPerSheet()
XlsReportConfiguration
getMaxRowsPerSheet
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_MAXIMUM_ROWS_PER_SHEET
public void setMaxRowsPerSheet(Integer maxRowsPerSheet)
public Boolean isIgnorePageMargins()
XlsReportConfiguration
If set to true
, any page in the document will be exported without taking into account its margins.
isIgnorePageMargins
in interface XlsReportConfiguration
ReportExportConfiguration.PROPERTY_IGNORE_PAGE_MARGINS
public void setIgnorePageMargins(Boolean isIgnorePageMargins)
public String getSheetHeaderLeft()
XlsReportConfiguration
getSheetHeaderLeft
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_HEADER_LEFT
public void setSheetHeaderLeft(String sheetHeaderLeft)
public String getSheetHeaderCenter()
XlsReportConfiguration
getSheetHeaderCenter
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_HEADER_CENTER
public void setSheetHeaderCenter(String sheetHeaderCenter)
public String getSheetHeaderRight()
XlsReportConfiguration
getSheetHeaderRight
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_HEADER_RIGHT
public void setSheetHeaderRight(String sheetHeaderRight)
public String getSheetFooterLeft()
XlsReportConfiguration
getSheetFooterLeft
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_FOOTER_LEFT
public void setSheetFooterLeft(String sheetFooterLeft)
public String getSheetFooterCenter()
XlsReportConfiguration
getSheetFooterCenter
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_FOOTER_CENTER
public void setSheetFooterCenter(String sheetFooterCenter)
public String getSheetFooterRight()
XlsReportConfiguration
getSheetFooterRight
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_FOOTER_RIGHT
public void setSheetFooterRight(String sheetFooterRight)
public String getPassword()
XlsReportConfiguration
getPassword
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_PASSWORD
public void setPassword(String password)
public String[] getSheetNames()
XlsReportConfiguration
getSheetNames
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_NAMES_PREFIX
public void setSheetNames(String[] sheetNames)
public Map<String,String> getFormatPatternsMap()
XlsReportConfiguration
getFormatPatternsMap
in interface XlsReportConfiguration
HSSFDataFormat
,
NumberFormat
public Boolean isIgnoreHyperlink()
isIgnoreHyperlink
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IGNORE_HYPERLINK
public void setIgnoreHyperlink(Boolean isIgnoreHyperlink)
public Boolean isIgnoreAnchors()
XlsReportConfiguration
isIgnoreAnchors
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IGNORE_ANCHORS
public void setIgnoreAnchors(Boolean isIgnoreAnchors)
public Integer getFitWidth()
XlsReportConfiguration
getFitWidth
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FIT_WIDTH
public void setFitWidth(Integer fitWidth)
public Integer getFitHeight()
XlsReportConfiguration
getFitHeight
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FIT_WIDTH
public void setFitHeight(Integer fitHeight)
public Integer getPageScale()
XlsReportConfiguration
XlsReportConfiguration.getFitWidth()
and XlsReportConfiguration.getFitHeight()
settings.getPageScale
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_PAGE_SCALE
public void setPageScale(Integer pageScale)
public RunDirectionEnum getSheetDirection()
XlsReportConfiguration
getSheetDirection
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_DIRECTION
public void setSheetDirection(RunDirectionEnum sheetDirection)
public Float getColumnWidthRatio()
XlsReportConfiguration
getColumnWidthRatio
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_COLUMN_WIDTH_RATIO
public void setColumnWidthRatio(Float columnWidthRatio)
public Boolean isUseTimeZone()
XlsReportConfiguration
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 XlsReportConfiguration.isDetectCellType()
is set.
isUseTimeZone
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_USE_TIMEZONE
public void setUseTimeZone(Boolean isUseTimeZone)
public Integer getFirstPageNumber()
XlsReportConfiguration
getFirstPageNumber
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FIRST_PAGE_NUMBER
public void setFirstPageNumber(Integer firstPageNumber)
public Boolean isShowGridLines()
XlsReportConfiguration
isShowGridLines
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHOW_GRIDLINES
public void setShowGridLines(Boolean isShowGridLines)
public ImageAnchorTypeEnum getImageAnchorType()
XlsReportConfiguration
getImageAnchorType
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IMAGE_ANCHOR_TYPE
public void setImageAnchorType(ImageAnchorTypeEnum imageAnchorType)
public Boolean isAutoFitPageHeight()
XlsReportConfiguration
isAutoFitPageHeight
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_AUTO_FIT_PAGE_HEIGHT
public void setAutoFitPageHeight(Boolean isAutoFitPageHeight)
public Boolean isForcePageBreaks()
XlsReportConfiguration
isForcePageBreaks
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FORCE_PAGE_BREAKS
public void setForcePageBreaks(Boolean isForcePageBreaks)
public Boolean isShrinkToFit()
XlsReportConfiguration
XlsReportConfiguration.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.isShrinkToFit
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHRINK_TO_FIT
public void setShrinkToFit(Boolean isShrinkToFit)
public Boolean isIgnoreTextFormatting()
XlsReportConfiguration
isIgnoreTextFormatting
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_IGNORE_TEXT_FORMATTING
public void setIgnoreTextFormatting(Boolean isIgnoreTextFormatting)
public Color getSheetTabColor()
XlsReportConfiguration
getSheetTabColor
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_SHEET_TAB_COLOR
public void setSheetTabColor(Color tabColor)
public Integer getFreezeRow()
XlsReportConfiguration
getFreezeRow
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FREEZE_ROW
public void setFreezeRow(Integer freezeRow)
public String getFreezeColumn()
XlsReportConfiguration
getFreezeColumn
in interface XlsReportConfiguration
XlsReportConfiguration.PROPERTY_FREEZE_COLUMN
public void setFreezeColumn(String freezeColumn)
Copyright © 2017. All rights reserved.