Four Js Genero Report Writer
FourJs.Report.Runtime.ExcelRenderer Class Reference

Class for configuring Excel (XLS/XLSX) output. More...

Inheritance diagram for FourJs.Report.Runtime.ExcelRenderer:
FourJs.Report.Runtime.FormatProducer FourJs.Report.Runtime.LayoutedPagesConsumer

Public Types

enum  OutputFormat { XLS, XLSX }
 

Public Member Functions

 ExcelRenderer (FormatHandler handler)
 Creates a ExcelRenderer object that outputs to the given handler object. More...
 
- Public Member Functions inherited from FourJs.Report.Runtime.FormatProducer
 FormatProducer (FormatHandler handler)
 Creates a FormatProducer object that outputs to the given handler object. More...
 

Static Public Attributes

static String legalCopyright = Version.CLASS_COPYRIGHT
 
- Static Public Attributes inherited from FourJs.Report.Runtime.FormatProducer
static String legalCopyright = Version.CLASS_COPYRIGHT
 

Properties

OutputFormat outputFormat [get, set]
 Sets the output format as determined by the outputFormat argument. More...
 
int fromPage [get, set]
 Sets the first page to be included in the document. fromPage an integer greater than zero and less than or equal to toPage More...
 
int toPage [get, set]
 Sets the last page (inclusive) to be included in the document. toPage an integer greater than zero and less than or equal to fromPage More...
 
bool removeWhitespace [get, set]
 Activates whitespace removal if true, columns or rows containing whitespace only are preserved if false. The default value is false. More...
 
bool ignoreRowAlignment [get, set]
 Sets whether the row alignment of items can be ignored allowing a more compact representation. The default value is false. More...
 
bool ignoreColumnAlignment [get, set]
 Sets whether the column alignment of items can be ignored allowing a more compact representation. The default value is false. More...
 
bool removeBackgroundImages [get, set]
 Activates background image removal if true, partially obscured images are preserved if false. The default value is false. More...
 
bool mergePages [get, set]
 Activates page merging if true, separate sheets for each page are created if false. The default value is false. More...
 
bool mergeCells [get, set]
 Activates cell merging if true, separate empty cells are created otherwise. The default value is true. More...
 
bool handleBorders [get, set]
 Activates border handling if true, borders are added to cells when borders are present in the document. Activating border handling may introduce empty rows and columns. The default value is false. More...
 
- Properties inherited from FourJs.Report.Runtime.FormatProducer
FormatHandler handler [get]
 Sets the specified handler as the handler for the output produced by this processor. More...
 

Detailed Description

Class for configuring Excel (XLS/XLSX) output.

Font embedding

Fonts are not included in the document since font embedding is not available in the XLS/XLSX formats.

Layout

By default a sheet is created for every page in the report. An option exists to merge all pages into one large sheet. Empty lines and columns are stripped from the output.

Faithfulness of output

The focus for the Excel output is on the "computability" of the content. The grid layout doesn't cater for items that span several cells such as borders and background colors. For faithful reproduction consider using the PDFRenderer, SVGRenderer, PostscriptRenderer, Printer or ImageRenderer.

Handling of overlapping items

Since the tabular layout does no allow for items to overlap, any items that overlap are replaced by an image containing a painting of the overlapping items. In such a case a warning is issued. An exception of this rule are background images which can be removed from document by using the method removeBackgroundImages.

Processing large documents

The XLS output is limited to 65536 row per sheet. Reports exceeding this value will be split into sheets of this size. The memory consumption of the XLS output is linear so that very large sheets can exhaust heap space. The memory consumption of the XSLSX output is constant. Memory is reclaimed on completion of a page.

Constructor & Destructor Documentation

FourJs.Report.Runtime.ExcelRenderer.ExcelRenderer ( FormatHandler  handler)

Creates a ExcelRenderer object that outputs to the given handler object.

Parameters
handler

Property Documentation

int FourJs.Report.Runtime.ExcelRenderer.fromPage
getset

Sets the first page to be included in the document. fromPage an integer greater than zero and less than or equal to toPage

Exceptions
ArgumentOutOfRangeExceptionif the above condition is violated.
bool FourJs.Report.Runtime.ExcelRenderer.handleBorders
getset

Activates border handling if true, borders are added to cells when borders are present in the document. Activating border handling may introduce empty rows and columns. The default value is false.

bool FourJs.Report.Runtime.ExcelRenderer.ignoreColumnAlignment
getset

Sets whether the column alignment of items can be ignored allowing a more compact representation. The default value is 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.

bool FourJs.Report.Runtime.ExcelRenderer.ignoreRowAlignment
getset

Sets whether the row alignment of items can be ignored allowing a more compact representation. The default value is 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.

bool FourJs.Report.Runtime.ExcelRenderer.mergeCells
getset

Activates cell merging if true, separate empty cells are created otherwise. The default value is true.

bool FourJs.Report.Runtime.ExcelRenderer.mergePages
getset

Activates page merging if true, separate sheets for each page are created if false. The default value is false.

OutputFormat FourJs.Report.Runtime.ExcelRenderer.outputFormat
getset

Sets the output format as determined by the outputFormat argument.

bool FourJs.Report.Runtime.ExcelRenderer.removeBackgroundImages
getset

Activates background image removal if true, partially obscured images are preserved if false. The default value is false.

bool FourJs.Report.Runtime.ExcelRenderer.removeWhitespace
getset

Activates whitespace removal if true, columns or rows containing whitespace only are preserved if false. The default value is false.

int FourJs.Report.Runtime.ExcelRenderer.toPage
getset

Sets the last page (inclusive) to be included in the document. toPage an integer greater than zero and less than or equal to fromPage

Exceptions
ArgumentOutOfRangeExceptionif the above condition is violated.