net.sf.flatpack.util
Class ExcelTransformer

java.lang.Object
  extended by net.sf.flatpack.util.ExcelTransformer

public class ExcelTransformer
extends java.lang.Object

Converts a DataSet object into an excel spreadsheet. Only detail records will be contained in the export. Header / Trailer records defined by tags in the pzmap will be ignored on the export.

Author:
Paul Zepernick

Constructor Summary
ExcelTransformer(DataSet ds, java.io.File xlsFile)
          Constructs a new Excel transformer
 
Method Summary
 void setExcludeFromExportColumns(java.lang.String[] excludeFromExportColumns)
          The columns names contained in the array will be igored if setExportOnlyColumns() is called.
 void setExportOnlyColumns(java.lang.String[] exportOnlyColumns)
          When set, only columns contained in the String[] will be exported out to Excel.
 void writeExcelFile()
          Writes the Excel file to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelTransformer

public ExcelTransformer(DataSet ds,
                        java.io.File xlsFile)
Constructs a new Excel transformer

Parameters:
ds - DataSet to convert
xlsFile - Excel file to be created
Method Detail

writeExcelFile

public void writeExcelFile()
                    throws java.io.IOException,
                           jxl.write.WriteException
Writes the Excel file to disk

Throws:
java.io.IOException
jxl.write.WriteException

setExcludeFromExportColumns

public void setExcludeFromExportColumns(java.lang.String[] excludeFromExportColumns)
The columns names contained in the array will be igored if setExportOnlyColumns() is called. Any columns names contained in this list will be excluded from the export in Excel.

Parameters:
excludeFromExportColumns - the excludeFromExportColumns to set

setExportOnlyColumns

public void setExportOnlyColumns(java.lang.String[] exportOnlyColumns)
When set, only columns contained in the String[] will be exported out to Excel.

Parameters:
exportOnlyColumns - the exportOnlyColumns to set


Copyright © 2006-2011 Appendium - Portfolio Financing Platform. All Rights Reserved.