ar.com.epere4.java2excel.excelWritter
Class ExcelWritter

java.lang.Object
  extended by ar.com.epere4.java2excel.excelWritter.ExcelWritter

public class ExcelWritter
extends java.lang.Object

This class allows you to print a some Collections to an excel file using some configuration Java2ExcelDtd.

Author:
epere4

Constructor Summary
ExcelWritter()
          Default constructor.
 
Method Summary
 void addReport(java.util.Collection data, Java2ExcelDtd metaData)
          Adds a collection to be printed in the excel workbook represented by this object.
 void addReport(java.util.Collection data, Java2ExcelDtd metaData, java.lang.String sheetName)
          Adds a collection to be printed in the excel workbook represented by this object.
 void saveTo(java.io.File outputFile)
          Saves the generated excel to the specified outputFile.
 void saveTo(java.io.OutputStream outputStream)
          Saves the generated excel to the specified outputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelWritter

public ExcelWritter()
Default constructor.

Since:
18/02/2006
Method Detail

addReport

public void addReport(java.util.Collection data,
                      Java2ExcelDtd metaData)
Adds a collection to be printed in the excel workbook represented by this object. For each collection added, a new excel sheet is created.

Parameters:
data - the collection to be printed in the excel file.
metaData - the configuration info.
Since:
18/02/2006

addReport

public void addReport(java.util.Collection data,
                      Java2ExcelDtd metaData,
                      java.lang.String sheetName)
Adds a collection to be printed in the excel workbook represented by this object. For each collection added, a new excel sheet is created with the specified sheetName.

Parameters:
data - the collection to be printed in the excel file.
metaData - the configuration info.
sheetName - The name for the seet being added to the excel. If null, then a default name will be used. Sheet name cannot be blank, greater than 31 chars, or contain any of /\\*?[].
Since:
05/03/2006

saveTo

public void saveTo(java.io.OutputStream outputStream)
            throws java.io.IOException
Saves the generated excel to the specified outputStream.

Parameters:
outputStream - the stream where you want to save the Excel.
Throws:
java.io.IOException - if any Input Output problem shows up.

saveTo

public void saveTo(java.io.File outputFile)
            throws java.io.IOException
Saves the generated excel to the specified outputFile.

Parameters:
outputFile - the file where you want to save the Excel.
Throws:
java.io.IOException - if any Input Output problem shows up.


Copyright © 2006 epere4. All Rights Reserved.