Pregunta

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?

¿Fue útil?

Solución 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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top