i am using the Apache POI to read an xlsx file. i can able to read the Sheet1 data. But when try to read the Sheet2 i am getting the Sheet1 data only.
String strPath = "..\\Test.xlsx";
File excelFile = new File(strPath);
FileInputStream fis = new FileInputStream(excelFile);
// we create an XSSF Workbook object for our XLSX Excel File
XSSFWorkbook workbook = new XSSFWorkbook(fis);
Sheet sheet1= workbook.getSheetAt(0);
Sheet sheet2= workbook.getSheetAt(1);