Frage

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?

War es hilfreich?

Lösung 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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top