Apache POI XSSF reading in excel files

前端 未结 8 2112
北恋
北恋 2021-02-13 00:00

I just have a quick question about how to read in an xlsx file using the XSSF format from Apache.

Right now my code looks like this:

InputStream fs = ne         


        
8条回答
  •  忘掉有多难
    2021-02-13 00:28

    this works fine: try it

    File filename = new File("E:/Test.xlsx");
    FileInputStream isr= new FileInputStream(filename);
    
    Workbook book1 = new XSSFWorkbook(isr);
    Sheet sheet = book1.getSheetAt(0);  
    Iterator rowItr = sheet.rowIterator();
    

提交回复
热议问题