com.jrefinery.report.targets.table.excel
Class ExcelProducer

java.lang.Object
  |
  +--com.jrefinery.report.targets.table.TableProducer
        |
        +--com.jrefinery.report.targets.table.excel.ExcelProducer

public class ExcelProducer
extends TableProducer

An output target for the report engine that generates an Excel file using the hffs class library from the Apache Jakarta Project (see http://jakarta.apache.org/poi/index.html.

At the moment only texts are exported.

Author:
Heiko Evermann

Field Summary
 
Fields inherited from class com.jrefinery.report.targets.table.TableProducer
AUTHOR, CREATOR, TITLE
 
Constructor Summary
ExcelProducer(java.io.OutputStream out, boolean strict)
          Creates a new Excel producer.
 
Method Summary
 void beginPage(java.lang.String name)
          Handles the start of a new page.
 void close()
          Closes the document and write the generated document.
 void configure(java.util.Properties configuration)
          Configures the table producer by reading the configuration settings from the given map.
 void endPage()
          Handles the end of a page, lays out the collected cells and write the excel sheet.
 TableCellDataFactory getCellDataFactory()
          Gets the TableProducer implementation of this TableProducer.
 boolean isOpen()
          Returns true if the output target is open, and false otherwise.
 void open()
          Opens the document; creates a new Workbook and initializes the excel file creation process.
 
Methods inherited from class com.jrefinery.report.targets.table.TableProducer
addCell, clearCells, createTableCellStyle, getCellCount, getProperty, getProperty, getPropertyNames, isDummy, layoutGrid, processBand, setDummy, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelProducer

public ExcelProducer(java.io.OutputStream out,
                     boolean strict)
Creates a new Excel producer.

Parameters:
out - the output stream.
strict - true, if a stricter layout should be used, false otherwise.
See Also:
TableGrid.isStrict()
Method Detail

getCellDataFactory

public TableCellDataFactory getCellDataFactory()
Gets the TableProducer implementation of this TableProducer.

Specified by:
getCellDataFactory in class TableProducer
Returns:
the ExcelCellDataFactory of this producer.

open

public void open()
Opens the document; creates a new Workbook and initializes the excel file creation process.

Specified by:
open in class TableProducer

beginPage

public void beginPage(java.lang.String name)
Handles the start of a new page. The page name is given as parameter. The TableWriter starts a new page whenever a manual pagebreak is found in the report definition. The ReportProducer has been opened before.

If the name is null, the default excel names are used as sheet names.

Specified by:
beginPage in class TableProducer
Parameters:
name - the page name

endPage

public void endPage()
Handles the end of a page, lays out the collected cells and write the excel sheet.

Specified by:
endPage in class TableProducer

close

public void close()
Closes the document and write the generated document.

Specified by:
close in class TableProducer

isOpen

public boolean isOpen()
Returns true if the output target is open, and false otherwise.

Specified by:
isOpen in class TableProducer
Returns:
true or false.

configure

public void configure(java.util.Properties configuration)
Configures the table producer by reading the configuration settings from the given map.

Specified by:
configure in class TableProducer
Parameters:
configuration - the configuration supplied by the table processor.