#org.seasar.extension.dataset.impl.XlsReader
/**
* {@link XlsReader}を作成します。
*
* @param in
* 入力ストリーム
* @param trimString
* 文字列をトリムするかどうか
*/
public XlsReader(InputStream in, boolean trimString) {
this.trimString = trimString;
try {
workbook = new HSSFWorkbook(in);
} catch (IOException ex) {
throw new IORuntimeException(ex);
}
dataFormat = workbook.createDataFormat();
dataSet = new DataSetImpl();
for (int i = 0; i < workbook.getNumberOfSheets(); ++i) {
createTable(workbook.getSheetName(i), workbook.getSheetAt(i));
}
}
public DataSet read() {
return dataSet;
}
# DataTable
/**
* @see org.seasar.extension.dataset.DataTable#getRowSize()
*/
public int getRowSize() {
return rows.size();
}
/**
* @see org.seasar.extension.dataset.DataTable#getRow(int)
*/
public DataRow getRow(int index) {
return (DataRow) rows.get(index);
}
댓글 없음:
댓글 쓰기