public class ImportConfigurationExcel extends ImportConfigurationFile
sheetIndex, which describes which sheet within the file should
be used.| Modifier and Type | Class and Description |
|---|---|
static class |
ImportConfigurationExcel.ExcelFileTypes
Valid file types for Excel files
XLS is the "old" Excel file type, XLSX is the "new" Excel file type.
|
| Constructor and Description |
|---|
ImportConfigurationExcel(java.lang.String fileLocation,
ImportConfigurationExcel.ExcelFileTypes excelFileType,
int sheetIndex,
boolean containsHeader)
Creates a new instance of this object.
|
ImportConfigurationExcel(java.lang.String fileLocation,
int sheetIndex,
boolean containsHeader)
Creates a new instance of this object without specifying the file type
The file type will be detected automatically using the file extension.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(ImportColumn column)
Adds a single column to import from
This makes sure that only
ImportColumnExcel can be added,
otherwise an IllegalArgumentException will be thrown. |
boolean |
getContainsHeader()
Indicates whether there actually is a header
A header is not necessarily mandatory.
|
ImportConfigurationExcel.ExcelFileTypes |
getExcelFileType() |
int |
getSheetIndex() |
void |
setContainsHeader(boolean containsHeader) |
void |
setExcelFileType(ImportConfigurationExcel.ExcelFileTypes excelFileType) |
void |
setSheetIndex(int sheetIndex) |
getFileLocation, setFileLocationgetColumns, isOptimizedLoading, setOptimizedLoadingpublic ImportConfigurationExcel(java.lang.String fileLocation,
ImportConfigurationExcel.ExcelFileTypes excelFileType,
int sheetIndex,
boolean containsHeader)
fileLocation - ImportConfigurationFile.setFileLocation(String)excelFileType - setExcelFileType(ExcelFileTypes)sheetIndex - setSheetIndex(int)containsHeader - setContainsHeader(boolean)public ImportConfigurationExcel(java.lang.String fileLocation,
int sheetIndex,
boolean containsHeader)
ImportConfigurationExcel.ExcelFileTypes.XLS.fileLocation - ImportConfigurationFile.setFileLocation(String)sheetIndex - sheetIndexcontainsHeader - containsHeaderpublic void addColumn(ImportColumn column)
ImportColumnExcel can be added,
otherwise an IllegalArgumentException will be thrown.addColumn in class ImportConfigurationcolumn - A single column to import from, ImportColumnExcelpublic boolean getContainsHeader()
containsHeaderpublic ImportConfigurationExcel.ExcelFileTypes getExcelFileType()
#ExcelFileTypespublic int getSheetIndex()
sheetIndexpublic void setContainsHeader(boolean containsHeader)
containsHeader - containsHeaderpublic void setExcelFileType(ImportConfigurationExcel.ExcelFileTypes excelFileType)
excelFileType - #ExcelFileTypespublic void setSheetIndex(int sheetIndex)
sheetIndex - sheetIndex