public interface ExcelDataProvider extends SeLionDataProvider
Modifier and Type | Method and Description |
---|---|
void |
addCustomTypes(DefaultCustomType type) |
List<org.apache.poi.ss.usermodel.Row> |
getAllRawExcelRows(String sheetName,
boolean heading)
Get all excel rows from a specified sheet.
|
List<String> |
getRowContents(String sheetName,
int rowIndex,
int size)
Using the specified rowIndex to search for the row from the specified Excel sheet, then return the row contents
in a list of string format.
|
Object |
getSingleExcelRow(int index)
This method can be used to fetch a particular row from an excel sheet.
|
Object |
getSingleExcelRow(String key)
This method fetches a specific row from an excel sheet which can be identified using a key and returns the data
as an Object which can be cast back into the user's actual data type.
|
getAllData, getDataAsHashtable, getDataByFilter, getDataByIndex, getDataByIndex, getDataByKeys
Object getSingleExcelRow(String key)
key
- - A string that represents a key to search for in the excel sheetObject getSingleExcelRow(int index)
index
- - The row number from the excel sheet that is to be read. For e.g., if you wanted to read the 2nd row
(which is where your data exists) in your excel sheet, the value for index would be 1. This method
assumes that your excel sheet would have a header which it would EXCLUDE. When specifying index
value always remember to ignore the header, since this method will look for a particular row ignoring
the header row.List<String> getRowContents(String sheetName, int rowIndex, int size)
rowIndex
- - The row number from the excel sheet that is to be read. For e.g., if you wanted to read the 2nd row
(which is where your data exists) in your excel sheet, the value for index would be 1. This method
assumes that your excel sheet would have a header which it would EXCLUDE. When specifying index
value always remember to ignore the header, since this method will look for a particular row ignoring
the header row.size
- - The number of columns to read, including empty and blank column.List<org.apache.poi.ss.usermodel.Row> getAllRawExcelRows(String sheetName, boolean heading)
sheetName
- - A String that represents the Sheet name from which data is to be readheading
- - If true, will return all rows along with the heading row. If false, will return all rows except the
heading row.Row
that are read.void addCustomTypes(DefaultCustomType type)
type
- - A DefaultCustomType
that represents custom types that need to be taken into consideration
when generating an Object that represents every row of data from the excel sheet.Copyright © 2016 PayPal Open Source. All rights reserved.