net.bpelunit.framework.control.datasource.excel
Class ExcelDataSource
java.lang.Object
net.bpelunit.framework.control.datasource.excel.ExcelDataSource
- All Implemented Interfaces:
- IDataSource
public class ExcelDataSource
- extends Object
- implements IDataSource
A data source that can read Excel files (incl .xlsx from Excel 2007).
Following restrictions apply to the Excel files:
- The first used row must contain the header (that will become the variable
name in the context)
- No merged cells
- Author:
- Daniel Luebke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExcelDataSource
public ExcelDataSource()
close
public void close()
- Specified by:
close in interface IDataSource
getFieldNames
public String[] getFieldNames()
- Specified by:
getFieldNames in interface IDataSource
getValueFor
public String getValueFor(String fieldName)
- Specified by:
getValueFor in interface IDataSource
setRow
public void setRow(int index)
throws DataSourceException
- Specified by:
setRow in interface IDataSource
- Throws:
DataSourceException
loadFromStream
public void loadFromStream(InputStream data)
throws DataSourceException
- Specified by:
loadFromStream in interface IDataSource
- Throws:
DataSourceException
readWorkbook
protected org.apache.poi.ss.usermodel.Workbook readWorkbook(InputStream data)
throws DataSourceException
- Throws:
DataSourceException
setSheet
public void setSheet(String index)
getNumberOfRows
public int getNumberOfRows()
- Specified by:
getNumberOfRows in interface IDataSource
Copyright © 2012 Leibniz Universität Hannover. All Rights Reserved.