https://bz.apache.org/bugzilla/show_bug.cgi?id=61343

--- Comment #2 from Javen O'Neal <[email protected]> ---
Refer to the Spreadsheet Quick Guide and examples for how to handle worksheets
that may contain empty rows or cells.

This is what you're looking for to return an empty row from a worksheet that
does not contain that row:

static Row getOrCreateRow(Sheet sheet, int rowIndex) {
    Row row = sheet.getRow(2);
    if (row == null) {
        row = sheet.createRow(2);
    }
    return row;
}

Conveniently, theres a function that is very similar to this in
org.apache.poi.ss.util.CellUtil.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to