zoukankan      html  css  js  c++  java
  • POI解析Excel文件

    @Test

    public void test1() throws FileNotFoundException, IOException{

    HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(new File("d:\abc.xls")));

    HSSFSheet sheet = workbook.getSheetAt(0);

    for (Row row : sheet) {

    String v1 = row.getCell(0).getStringCellValue();

    String v2 = row.getCell(1).getStringCellValue();

    String v3 = row.getCell(2).getStringCellValue();

    String v4 = row.getCell(3).getStringCellValue();

    String v5 = row.getCell(4).getStringCellValue();

    System.out.println(v1 + " " + v2+" " + v3+ " " +v4+ " " + v5);

    }

    }

  • 相关阅读:
    mkdir,rmdir
    linux目录结构
    echo
    date
    man
    cd
    ls
    线程、进程
    php类型的自动转换
    电商
  • 原文地址:https://www.cnblogs.com/fjkgrbk/p/poi_Excel.html
Copyright © 2011-2022 走看看