Question

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?

Was it helpful?

Solution 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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top