public class ExcelReader extends AbstractReader
DataEndpoint.State
currentRecord, fieldNames, lastRow, startingRow
fieldLineage, recordLineage
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEY
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZE
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
ExcelReader(ExcelDocument document) |
Modifier and Type | Method and Description |
---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException . |
protected Record |
addLineage(Record record) |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
protected boolean |
fillRecord(Record record) |
ExcelDocument |
getDocument() |
long |
getLineNumber() |
int |
getSheetIndex() |
String |
getSheetName() |
int |
getStartingColumn() |
boolean |
isAutoCloseDocument()
Indicates if the ExcelDocument should be closed when this endpoint is closed.
|
boolean |
isEvaluateExpressions() |
boolean |
isLineageSupported() |
boolean |
isUseSheetColumnCount() |
void |
open()
Makes this endpoint ready for reading or writing.
|
ExcelReader |
setAutoCloseDocument(boolean autoCloseDocument)
Indicates if the ExcelDocument should be closed when this endpoint is closed.
|
ExcelReader |
setDescription(String description) |
ExcelReader |
setEvaluateExpressions(boolean evaluateExpressions) |
ExcelReader |
setFieldNames(Collection<String> fieldNames) |
ExcelReader |
setFieldNames(String... fieldNames) |
ExcelReader |
setFieldNamesInFirstRow(boolean fieldNamesInFirstRow) |
ExcelReader |
setLastRow(int lastRow) |
ExcelReader |
setSaveLineage(boolean saveLineage) |
ExcelReader |
setSheetIndex(int sheetIndex) |
ExcelReader |
setSheetName(String sheetName) |
ExcelReader |
setSkipEmptyRows(boolean skipEmptyRows)
Indicates that rows with only null values should not be returned by the reader (default is false).
|
ExcelReader |
setStartingColumn(int startingColumn) |
ExcelReader |
setStartingRow(int startingRow) |
ExcelReader |
setUseSheetColumnCount(boolean useSheetColumnCount)
Set whether to use the entire worksheet (or just the current row) when
determining each record's field count.
|
getFieldNames, getLastRow, getStartingRow, isFieldNamesInFirstRow, isSkipEmptyRows, read, readImpl
available, getBufferSize, getNestedEndpoint, getNestedReader, getRootEndpoint, getRootReader, isExhausted, isSaveLineage, peek, pop, push, skip
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toString
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime
public ExcelReader(ExcelDocument document)
public void open()
DataEndpoint
open
in class AbstractReader
public void close() throws DataException
DataEndpoint
close
in class DataEndpoint
DataException
public ExcelDocument getDocument()
public String getSheetName()
public ExcelReader setSheetName(String sheetName)
public int getSheetIndex()
public ExcelReader setSheetIndex(int sheetIndex)
public int getStartingColumn()
public ExcelReader setStartingColumn(int startingColumn)
public long getLineNumber()
public boolean isEvaluateExpressions()
public ExcelReader setEvaluateExpressions(boolean evaluateExpressions)
public boolean isUseSheetColumnCount()
public ExcelReader setUseSheetColumnCount(boolean useSheetColumnCount)
false
meaning each record may contain a different number of fields depending on
the row.public ExcelReader setAutoCloseDocument(boolean autoCloseDocument)
false
.public boolean isAutoCloseDocument()
false
.public ExcelReader setFieldNamesInFirstRow(boolean fieldNamesInFirstRow)
setFieldNamesInFirstRow
in class AbstractReader
public ExcelReader setFieldNames(String... fieldNames)
setFieldNames
in class AbstractReader
public ExcelReader setFieldNames(Collection<String> fieldNames)
setFieldNames
in class AbstractReader
public ExcelReader setStartingRow(int startingRow)
setStartingRow
in class AbstractReader
public ExcelReader setLastRow(int lastRow)
setLastRow
in class AbstractReader
public ExcelReader setSkipEmptyRows(boolean skipEmptyRows)
AbstractReader
setSkipEmptyRows
in class AbstractReader
public ExcelReader setSaveLineage(boolean saveLineage)
setSaveLineage
in class DataReader
public ExcelReader setDescription(String description)
setDescription
in class Endpoint
protected boolean fillRecord(Record record) throws Throwable
fillRecord
in class AbstractReader
Throwable
public boolean isLineageSupported()
isLineageSupported
in class DataReader
protected Record addLineage(Record record)
addLineage
in class DataReader
public DataException addExceptionProperties(DataException exception)
Endpoint
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in class AbstractReader
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.