Domanda

I wanna ask that does CELL_TYPE_BLANK works for hssf or xls file system? I knw it works for xlsx or XSSF but i'm having problem with xls?

È stato utile?

Soluzione 2

If you want complete certainty then you can use this code:

 for(Row blankRow : sheet)
    {
     for(int cn = 0; cn < blankRow.getLastCellNum(); cn++) 
        {
            Cell cells = blankRow.getCell(cn, Row.CREATE_NULL_AS_BLANK);
        }
    }

It marks all the null spaces as blank and then the CELL_TYPE_BLANK works like it should be working.

Altri suggerimenti

Yes it does. But take note that CELL_TYPE_BLANK is no null. You should always check first if the cell is null before identifying the cell type.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top