protected ITableIterator createIterator(boolean reversed) throws DataSetException { if (logger.isDebugEnabled()) logger.debug("createIterator(reversed={}) - start", String.valueOf(reversed)); ITable[] tables = (ITable[]) _tables.orderedValues().toArray(new ITable[0]); return new DefaultTableIterator(tables, reversed); }
/** Creates a new XlsDataSet object that loads the specified Excel document. */ public XlsDataSet(InputStream in) throws IOException, DataSetException { _tables = super.createTableNameMap(); HSSFWorkbook workbook = new HSSFWorkbook(in); int sheetCount = workbook.getNumberOfSheets(); for (int i = 0; i < sheetCount; i++) { ITable table = new XlsTable(workbook.getSheetName(i), workbook.getSheetAt(i)); _tables.add(table.getTableMetaData().getTableName(), table); } }