org.dbunit.dataset.excel
Class XlsDataSetWriter

java.lang.Object
  extended by org.dbunit.dataset.excel.XlsDataSetWriter

public class XlsDataSetWriter
extends Object

Writes an IDataSet to an XLS file or OutputStream.

Since:
2.4.0
Version:
$Revision: 915 $ $Date: 2008-12-07 14:17:25 +0100 (Sun, 07 Dec 2008) $
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $

Field Summary
static String DATE_FORMAT_AS_NUMBER_DBUNIT
          A special format pattern used to create a custom HSSFDataFormat which marks Date values that are stored via POI to an XLS file.
static String ZEROS
           
 
Constructor Summary
XlsDataSetWriter()
           
 
Method Summary
protected static org.apache.poi.hssf.usermodel.HSSFCellStyle createDateCellStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
           
protected  void setDateCell(org.apache.poi.hssf.usermodel.HSSFCell cell, Date value, org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
           
protected  void setNumericCell(org.apache.poi.hssf.usermodel.HSSFCell cell, BigDecimal value, org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
           
 void write(IDataSet dataSet, OutputStream out)
          Write the specified dataset to the specified Excel document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZEROS

public static final String ZEROS
See Also:
Constant Field Values

DATE_FORMAT_AS_NUMBER_DBUNIT

public static final String DATE_FORMAT_AS_NUMBER_DBUNIT
A special format pattern used to create a custom HSSFDataFormat which marks Date values that are stored via POI to an XLS file. Note that it might produce problems if a normal numeric value uses this format pattern incidentally.

See Also:
Constant Field Values
Constructor Detail

XlsDataSetWriter

public XlsDataSetWriter()
Method Detail

write

public void write(IDataSet dataSet,
                  OutputStream out)
           throws IOException,
                  DataSetException
Write the specified dataset to the specified Excel document.

Throws:
IOException
DataSetException

createDateCellStyle

protected static org.apache.poi.hssf.usermodel.HSSFCellStyle createDateCellStyle(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)

setDateCell

protected void setDateCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
                           Date value,
                           org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)

setNumericCell

protected void setNumericCell(org.apache.poi.hssf.usermodel.HSSFCell cell,
                              BigDecimal value,
                              org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)


Copyright © 2002-2012. All Rights Reserved.