public class ExcelRenderer extends FormatProducer implements LayoutedPagesConsumer, java.io.Serializable
PDFRenderer
, SVGRenderer
, PostscriptRenderer
, Printer
or ImageRenderer
.
setRemoveBackgroundImages(Boolean)
.
Modifier and Type | Class and Description |
---|---|
static class |
ExcelRenderer.OutputFormat |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Modifier | Constructor and Description |
---|---|
protected |
ExcelRenderer()
Creates a ExcelRenderer object.
|
|
ExcelRenderer(FormatHandler handler)
Creates a ExcelRenderer object that outputs to the given
handler object.
|
Modifier and Type | Method and Description |
---|---|
void |
setFromPage(java.lang.Integer fromPage)
Sets the first page to be included in the document.
|
void |
setHandleBorders(java.lang.Boolean handleBorders)
Activates border handling if true, borders are added to cells
when borders are present in the document.
|
void |
setIgnoreColumnAlignment(java.lang.Boolean ignoreColumnAlignment)
Sets whether the column alignment of items can be ignored
allowing a more compact representation.
|
void |
setIgnoreRowAlignment(java.lang.Boolean ignoreRowAlignment)
Sets whether the row alignment of items can be ignored
allowing a more compact representation.
|
void |
setMergeCells(java.lang.Boolean mergeCells)
Activates cell merging if true, separate empty cells
are created otherwise.
|
void |
setMergePages(java.lang.Boolean mergePages)
Activates page merging if true, separate sheets for each page
are created if false.
|
void |
setOutputFormat(ExcelRenderer.OutputFormat outputFormat)
Sets the output format as determined by the
outputFormat
argument. |
void |
setRemoveBackgroundImages(java.lang.Boolean removeBackgroundImages)
Activates background image removal if true, partially obscured images
are preserved if false.
|
void |
setRemoveWhitespace(java.lang.Boolean removeWhitespace)
Activates whitespace removal if true, columns or rows containing
whitespace only are preserved if false.
|
void |
setToPage(java.lang.Integer toPage)
Sets the last page (inclusive) to be included in the document.
|
setHandler
public static final java.lang.String legalCopyright
protected ExcelRenderer()
public ExcelRenderer(FormatHandler handler)
handler
- A FormatHandlerpublic void setFromPage(java.lang.Integer fromPage)
fromPage
- an integer greater than zero and less than or equal to
toPage.java.lang.IllegalArgumentException
- if the above condition
is violated.public void setToPage(java.lang.Integer toPage)
toPage
- an integer greater than zero and greater than or equal
to fromPage.java.lang.IllegalArgumentException
- if the above condition
is violated.public void setRemoveWhitespace(java.lang.Boolean removeWhitespace)
false
.removeWhitespace
- whether columns or rows containing whitespace
only are removed.public void setIgnoreRowAlignment(java.lang.Boolean ignoreRowAlignment)
false
.
When set, only those objects that are entirely above or entirely below each other will go in separate rows. The option reduces the amount of rows thereby loosing the horizontal alignment. The topology is not changed so that visually stacked items remain stacked.
ignoreRowAlignment
- whether row alignment can be ignored.public void setIgnoreColumnAlignment(java.lang.Boolean ignoreColumnAlignment)
false
.
When set, only those objects that are entirely to the left or entirely to the right each other will go in separate columns. The option reduces the amount of columns thereby loosing the vertical alignment. The topology is not changed so that visually adjacent items remain adjacent.
ignoreColumnAlignment
- whether column alignment can be ignored.public void setRemoveBackgroundImages(java.lang.Boolean removeBackgroundImages)
false
.removeBackgroundImages
- whether partially obscured images are
removed.public void setMergePages(java.lang.Boolean mergePages)
false
.mergePages
- whether all pages are merged into a single sheetpublic void setMergeCells(java.lang.Boolean mergeCells)
true
.mergeCells
- whether the cells of content spanning several cells shall be merged.public void setHandleBorders(java.lang.Boolean handleBorders)
false
.handleBorders
- whether borders in the document shall be mapped to cell borders in the spreadsheet.public void setOutputFormat(ExcelRenderer.OutputFormat outputFormat)
outputFormat
argument.outputFormat
- one of the following values: