java excel读取

  1. java读写excel 需要引入一下jar包

    compile group: 'org.apache.poi', name: 'poi-ooxml', version: '4.0.1'
    compile group: 'org.apache.poi', name: 'poi', version: '4.0.1'
    
  2. 读取excel表格

     Workbook workbook= WorkbookFactory.create(new FileInputStream("C:\\Users\\Administrator\\Desktop\\新建 XLSX 工作表.xlsx"));
        for(int i=0;i
    excel源文件
    执行结果

你可能感兴趣的:(java excel读取)