title: how to store data from excel sheet into mysql database using jdbc connection
body: <p>I have written the code for access data from Excel sheet but 
       i am not able to store into database using JDBC .
      my code for access data from excel sheet </p>
  
  <pre><code>   try{
      List list=new ArrayList();
      String fileName="d:\\menu.xls";
      File file=new File(fileName);
      InputStream input = new BufferedInputStream(new FileInputStream(file));
      POIFSFileSystem fs = new POIFSFileSystem( input );
      HSSFWorkbook wb = new HSSFWorkbook(fs);
      HSSFSheet sheet = wb.getSheetAt(0);
    //int i=0;
   Iterator rows=sheet.rowIterator();
   while(rows.hasNext()){
       HSSFRow row=(HSSFRow)rows.next();
       System.out.println("\n");
       Iterator cells=row.cellIterator();
       while( cells.hasNext() ) {
           HSSFCell cell = (HSSFCell) cells.next();
           if(HSSFCell.CELL_TYPE_NUMERIC==cell.getCellType()){
           System.out.print(cell.getNumericCellValue()+" " );
          // list.add(cell.getNumericCellValue());
  
           }
           else if (HSSFCell.CELL_TYPE_STRING==cell.getCellType()){
               System.out.print(cell.getStringCellValue()+" " );
               //list.add(cell.getStringCellValue());
  
           }
           else
               if (HSSFCell.CELL_TYPE_BOOLEAN==cell.getCellType()){
               System.out.print(cell.getBooleanCellValue()+" " );
               //list.add(cell.getBooleanCellValue());
  
               }
               else
                   if(HSSFCell.CELL_TYPE_BLANK==cell.getCellType()){
                       System.out.print( "BLANK     " );}
                       else
                   System.out.print("Unknown cell type");
  
       }
  
   }
  System.out.println(list);
  }catch(Exception e){
      e.printStackTrace();
  }
  </code></pre>
  
  <p>I got all the data into myeclipse console bt i have no idea how to store in DB</p>
  
  <p>please tell me how to store data into mysql database using JDBC </p>
  
  <p>Thanx in advance </p>