Hi,
I want to read the data from the excel sheet and to display it in the HTML table as output.
I want to read a specific row from the excel based some unique value. (Say an example of EmpID).
I have tried the below code:
FileInputStream fileInputStream = new FileInputStream("d:/Test.xls");
HSSFWorkbook workbook = new HSSFWorkbook(fileInputStream);
HSSFSheet worksheet = workbook.getSheet("Test");
HSSFRow row1 = worksheet.getRow(0);
HSSFCell cellA1 = row1.getCell((short) 0);
String a1Val = cellA1.getStringCellValue();
HSSFCell cellB1 = row1.getCell((short) 1);
String b1Val = cellB1.getStringCellValue();
HSSFCell cellC1 = row1.getCell((short) 2);
String c1Val = cellC1.getStringCellValue();
Using this i can retrieve the first row of the excel. But i want to read the particular column based on the key value.
Could someone please help me?
Thanks,
Rajesh.B