public class DataStreamExcel extends Object implements DataStream
DataStream that retrieves the data from an Excel spreadsheet.| Constructor and Description |
|---|
DataStreamExcel() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream releasing all resources associated to it.
|
boolean |
containsMergedCells()
Returns true if current row contains merged cells.
|
Object |
getCell(int colNum)
Returns the data in a cell from the current row.
|
Object |
getCell(int rowNum,
int colNum)
Returns a data in a cell for given row.
|
String |
getColumnLabel(int colNum)
Returns the label of the column.
|
List<org.apache.poi.ss.util.CellRangeAddress> |
getMergedRegions()
Returns list of merged regions of the current row.
|
int |
getRowIndex()
Returns the 0-based index of the currently read row.
|
String |
getRowLabel()
Returns the label of the currently read row.
|
int |
getRowSize()
Returns the row size, that is the number of columns of this row.
|
List<Integer> |
getUrlColumns() |
boolean |
isEndOfStream()
Returns true if the end of the stream has been reached, and there is no more data.
|
void |
nextRow()
Switches to the next row.
|
void |
open(InputStream stream)
Opens the given stream to read data from.
|
void |
setUrlColumns(List<Integer> urlColumns) |
public List<Integer> getUrlColumns()
getUrlColumns in interface DataStreampublic void setUrlColumns(List<Integer> urlColumns)
setUrlColumns in interface DataStreamurlColumns - the urlColumns to setpublic void open(InputStream stream)
DataStreamopen in interface DataStreamstream - the stream to read frompublic void close()
DataStreamclose in interface DataStreampublic void nextRow()
DataStreamnextRow in interface DataStreampublic Object getCell(int colNum)
DataStreamgetCell in interface DataStreamcolNum - the 0-based index of the cell column, should be less than row size.public Object getCell(int rowNum, int colNum)
DataStreamgetCell in interface DataStreamrowNum - row indexcolNum - column indexpublic boolean containsMergedCells()
DataStreamcontainsMergedCells in interface DataStreampublic List<org.apache.poi.ss.util.CellRangeAddress> getMergedRegions()
DataStreamgetMergedRegions in interface DataStreampublic int getRowSize()
DataStreamgetRowSize in interface DataStreampublic boolean isEndOfStream()
DataStreamisEndOfStream in interface DataStreampublic String getColumnLabel(int colNum)
DataStreamgetColumnLabel in interface DataStreamcolNum - the 0-based index of the columnpublic int getRowIndex()
DataStreamgetRowIndex in interface DataStreampublic String getRowLabel()
DataStreamgetRowLabel in interface DataStreamCopyright © 2025 European Spallation Source. All rights reserved.