Code to read xls file:
1 2 3 4 5 6 7 8 9 10 11 | public readXls (String path, int i) { try { FileInputStream fis = new FileInputStream(path); HSSFWorkbook workbook = new HSSFWorkbook(fis); HSSFSheet sheet = workbook.getSheetAt(i); fis.close(); } catch (Exception e) { e.printStackTrace(); } } |