Missing cell policy of Apache POI Java

前端 未结 2 1543
礼貌的吻别
礼貌的吻别 2021-01-05 12:20

Can somebody please explain about the Missing cell policy of Apache POI ? What are exactly missing cells ? I didn\'t find the Apache POI

2条回答
  •  暖寄归人
    2021-01-05 12:54

    I'm using the code in java as below, it's working good for me :) hope it helps.

    ArrayList> cellArrayListHolder = new ArrayList>();
    FileInputStream excelFile = new FileInputStream(new File(fileName));
    
    Workbook workbook = new XSSFWorkbook(excelFile);
    Sheet datatypeSheet = workbook.getSheetAt(0);
    Iterator iterator = datatypeSheet.iterator();
    while (iterator.hasNext())
    {
        ArrayList cellStoreArrayList = new ArrayList();
        Row currentRow = iterator.next();
        Iterator cellIterator = currentRow.iterator();
        int column_counting = 0;
        int patched_count = 0;
        while (cellIterator.hasNext() && column_counting < read_column_size) {
            column_counting ++;
            Cell currentCell = cellIterator.next();
            int missed_column = 1 - column_counting + currentCell.getColumnIndex() - patched_count;  
            for(int i=0; i

提交回复
热议问题