I have written code as below to fetch value from Excel.
String CID = s1.getRow(i).getCell(0).getStringCellValue();
but in excel, 1st cell is a numeric value, but in above code I am trying to fetch String cell value. thats why I am getting error as :
Exception in thread "main" java.lang.IllegalStateException: Cannot get a text value from a numeric cell
Can anyone please provide a solution for this. how to fetch the numeric value from excel?