BlogJava 联系 聚合 管理  

Blog Stats

随笔档案(17)

文章档案(1)


GaoWei

try
  {
  Workbook book=Workbook.getWorkbook(new File("F:/gw_work/2006-8-31/all.xls"));
     Sheet sheet=book.getSheet(2);
     int rowcnt=sheet.getRows();
     int columns=sheet.getColumns();
     String data[]=new String[columns];
     System.out.println(data.length);
     for(int i=0;i<rowcnt;i++)
     {
      
      for(int j=0;j<columns;j++)
      {
       Cell cell1=sheet.getCell(j,i);
    String result=cell1.getContents();
    data[j]=result;
    System.out.print(result+"\t");
      }
      System.out.println("in----------------------");
      Mysql.upData(data);
      System.out.println("out----------------------");
     }
    
    
 } catch (BiffException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 } catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 }
posted on 2006-09-03 01:56 gggg874 阅读(418) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: