Hello,
Assuming that we have Excel file and the elements of requested column represented as Enum class
As know in Enum there are no setters and getters so how to represent our data from enum class to read that column which contain the elements.
That all what i could do it , i doubt if FederalState[] loc = FederalState.values(); is correct and if correct i have no idea how to continue using object "loc" as long as i don't have any setters or getters. (or should i create another class to represent the data with setters and getters?
Assuming that we have Excel file and the elements of requested column represented as Enum class
Code:
public enum FederalState {BW, BY, BE, BB, BR, HH, HE, MV, NI, NRW, RP, SL, SN, ST, SH, TH}
Code:
//Iterate through each rows from first sheet
Iterator<Row> rowIterator = sheet.iterator();
while(rowIterator.hasNext()) {
Row row = rowIterator.next();
//display from the first row
if(row.getRowNum() > 0)
{
FederalState[] loc = FederalState.values();
// do some thing to read the elements from that column