Hi Nick

That's really great!
But in my eyes having a (static) method called HSSFCell.setMissingCellPolicy(MissingCellPolicy policy) in addition to the normal HSSFCell getCell(short cellNum) would do a better job than the MissingCellPolicy being set everytime getCell is called. The standard MissingCellPolicy would be set to RETURN_NULL_AND_BLANK. Existing code could be edited with minimal effort using my suggestion.

What do you think?

Thanks


Zitat von Nick Burch <[EMAIL PROTECTED]>:

On Tue, 6 May 2008, Anthony Andrews wrote:
To keep things clean, how about an overloaded version of the
getCell(int) method that takes a second parameter so getCell(int, int)
for example; manifest constants could be declared as well so that the
user could choose how to handle the cell if a null value was returned.

OK, I've added something like this to svn trunk. There's now a new method:
        public HSSFCell getCell(int cellnum, MissingCellPolicy policy)

The policies are below:

/** Missing cells are returned as null, Blank cells are returned as normal */
public static final MissingCellPolicy RETURN_NULL_AND_BLANK
/** Missing cells are returned as null, as are blank cells */
public static final MissingCellPolicy RETURN_BLANK_AS_NULL
/** A new, blank cell is created for missing cells. Blank cells are
returned as normal */
public static final MissingCellPolicy CREATE_NULL_AS_BLANK


Hopefully that covers everything you'd need?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to