poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eslam Foad <eslam.f...@gmail.com>
Subject New method suggestion
Date Tue, 14 Dec 2010 11:30:30 GMT
Hello all,
I would like to propose a new method to be added to the POI API regarding
the excel sheets, some times I just need to know whether a certain cell in a
row is empty regardless to whether it is empty or blank, it really doesn't
matter if I created a blank cell instead of an empty cell so I would like to
suggest to add the following method

/**
     * check if there's a value whether the cell in blank or empty
     * @param row
     * @param cellIndex
     * @return boolean representing whether the cell is empty or not
     */
    private static boolean isEmptyCell(Row row, int cellIndex) {
        return row.getCell(cellIndex,
Row.CREATE_NULL_AS_BLANK).getCellType() == Cell.CELL_TYPE_BLANK;
    }

Regards,
-- 
If u wanna be big, dream big,
   Beware of ur dreams they might come true,
        Don't u love CONTRADICTION!!!!
http://www.sunfall.wordpress.com
Eslam Foad

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message