title: Read Excel and insert to Access Database using java
body: <p>I am new to Java World, Using Apache Poi I am able to read the Student Excel sheet and display the output in the console(with col header ie Name, Roll no, Address, Location.)</p>
  
  <pre><code> String a = "E:/Data.xls";
      List sheetData = new ArrayList();
  
      FileInputStream fis = null;
      try {
  
          fis = new FileInputStream(a);
  
          HSSFWorkbook workbook = new HSSFWorkbook(fis);
  
          HSSFSheet sheet = workbook.getSheetAt(0);
  
          Iterator rows = sheet.rowIterator();
          while (rows.hasNext()) {
              HSSFRow row = (HSSFRow) rows.next();
              Iterator cells = row.cellIterator();
  
              List data = new ArrayList();
              while (cells.hasNext()) {
                  HSSFCell cell = (HSSFCell) cells.next();
                  data.add(cell);
              }
  
              sheetData.add(data);
          }
      } catch (IOException e) {
          e.printStackTrace();
      } finally {
          if (fis != null) {
              fis.close();
          }
      }
      showExelData(sheetData);
  }
  
  private static void showExelData(List sheetData) {
  
      for (int i = 0; i &lt; sheetData.size(); i++) {
          List list = (List) sheetData.get(i);
          for (int j = 0; j &lt; list.size(); j++) {
  
              HSSFCell cell = (HSSFCell) list.get(j);
              //headers display
              System.out.print(cell.getRichStringCellValue().getString());
  
              if (j &lt; list.size() - 1) {
                  System.out.print("\t");
              }
          }
          System.out.println("");
      }
  
  }
  }
  </code></pre>
  
  <p>SO My issue is i need to fetch data from excel and need to insert to my Access "Student" table. I knw the DB connection function. How can i fetch and insert exact info to the table with ignoring col headers. Any Suggestions Plz.
  Thnks in Advance.</p>