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, setFileLocation
getColumns, isOptimizedLoading, setOptimizedLoading
public 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
- sheetIndex
containsHeader
- containsHeader
public void addColumn(ImportColumn column)
ImportColumnExcel
can be added,
otherwise an IllegalArgumentException
will be thrown.addColumn
in class ImportConfiguration
column
- A single column to import from, ImportColumnExcel
public boolean getContainsHeader()
containsHeader
public ImportConfigurationExcel.ExcelFileTypes getExcelFileType()
#ExcelFileTypes
public int getSheetIndex()
sheetIndex
public void setContainsHeader(boolean containsHeader)
containsHeader
- containsHeader
public void setExcelFileType(ImportConfigurationExcel.ExcelFileTypes excelFileType)
excelFileType
- #ExcelFileTypes
public void setSheetIndex(int sheetIndex)
sheetIndex
- sheetIndex