Can somebody please explain about the Missing cell policy
of Apache POI
? What are exactly missing cells ? I didn't find the Apache POI
docs link to be self-explanatory on what exactly are missing cells.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Did you read the Apache POI Excel Busy Developer's Guide?
If you're iterating over columns in a row, some cells that are blank may not even exist, which may causing unsuspecting code to throw a
NullPointerException
. AMissingCellPolicy
, when passed togetCell
, guides and simplifies code that tells Apache POI how to handle these kinds of cells.Cell
returned doesn't exist, instead of returningnull
, create a newCell
with a cell type of "blank". This can help avoidNullPointerException
s conveniently.null
. This can allow you ignore blank cells that do exist easily.null
for cells that don't really exist and return the blankCell
if it exists but its cell type is blank. This is the behavior of thegetCell
overload that doesn't take aMissingCellPolicy
.