I have identifiied row index(0,1), as well as column index (0,1)
while(cells.hasNext())
{
XSSFCell cell = (XSSFCell) cells.next();
String Value=null;
if(cell.getCellType() == cell.CELL_TYPE_STRING) {
Value=cell.getStringCellValue();
System.out.println("string values-->"+Value);
}
else if(cell.getCellType() == cell.CELL_TYPE_NUMERIC) {
//int Value2=(Integer) null;
double Value2=cell.getNumericCellValue();
System.out.println("numbercal values--->"+Value2);
int Value3=cell.getColumnIndex();
System.out.println("col index--->"+Value3);
int Value4=cell.getRowIndex();
System.out.println("Row index--->"+Value4);
}
number of rows---->1
numbercal values--->22.0
col index--->0
Row index--->0
numbercal values--->33.0
col index--->1
Row index--->0
numbercal values--->44.0
col index--->2
Row index--->0
string values-->aa
numbercal values--->43988.65908564815
col index--->4
Row index--->0
string values-->77-SS_001
string values-->DONE
numbercal values--->23.0
col index--->0
Row index--->1
numbercal values--->34.0
col index--->1
Row index--->1
numbercal values--->45.0
col index--->2
Row index--->1
string values-->aa
numbercal values--->43988.65908564815
col index--->4
Row index--->1
string values-->77-SS_002
string values-->NoDONE
I need to print
22 33(row index 0 and column index 0.1)
and
23 34(row index 1 and column index 0,1)
I was not sure how to print this kind of 2 dimentional cell value. I could not find corresponding method in API yet. Please advise