I have n rows and Columns of Excel sheet . example
Name OrderId Count Date
ANC 1234 5 23/3/18
ABCD 2345 6 23/3/18
XYGS 3567 7 23/3/18
So in the above data , i want to read the Orderid and Count and give them as input to the next call. I have used the below code
if(columnIndex != 0) {
for(Row row1: sheet) {
Cell C =row1.getCell(columnIndex);
po_number =c.getStringCellValue();
excelList.add(po_number);
int n = columnIndex+1;
Cell line_number1= row1.getCell(n);
line_number = line_number1.getStringCellValue();
FileOutputStream("D:\Users\abcd\Documents\AMD\Output\output.csv"));
System.out.println(po_number + " " +line_number);
}
}
The above code reads the excel sheet and gives the input in console, but i want the particular role to be get assigned in some array or list , from where i can give it as input to next function in iterative manner. Can someone help me with this.