pentaho/pentaho-kettle · error · RuntimeException
Unable to get value of cell (" + cell.getColumnIndex() + "…
Error message
Unable to get value of cell (" + cell.getColumnIndex() + ", " + cell.getRowIndex() + ") What it means
PoiCell.getValue() reads the typed value of an Apache POI cell and wraps any Exception in a RuntimeException naming the cell's column and row index. It is thrown when POI's typed accessors (getNumericCellValue, getStringCellValue, etc.) fail for the cell's underlying data — typically a formula evaluation error or a data-format problem.
Solutions
- Check e.getCause() to identify the failing POI operation and fix the cell at its root.
- Re-open the source file in Excel/LibreOffice, re-save, and retry to normalize cell types.
- If formulas are involved, ensure the workbook is loaded with formula evaluation enabled or pre-compute the values.
- Upgrade the POI version bundled with Pentaho, as some type-handling bugs are POI-side.
Example fix
// before
Object v = cell.getValue(); // may throw
// after
Object v;
try { v = cell.getValue(); }
catch (RuntimeException e) {
log.logError("Cell " + cell.getColumn() + "," + cell.getRow() + " unreadable: " + e.getMessage());
v = null;
} Defensive patterns
Strategy: try-catch
Validate before calling
Object v = null; try { v = cell.getValue(); } catch (RuntimeException ignored) {} // probe readability before use Type guard
boolean hasValue(KCell c) { try { return c.getValue() != null; } catch (RuntimeException e) { return false; } } Try / catch
try { Object v = cell.getValue(); } catch (RuntimeException e) { handleUnreadableCell(cell.getColumn(), cell.getRow(), e.getCause()); } Prevention
- Pre-compute or strip formulas in source files
- Re-save workbooks in Excel/LibreOffice to normalize cell types
- Check the cause chain for POI-specific errors
- Keep the bundled POI version up to date
When it happens
Trigger: Calling value()/getValue() on a PoiCell when the switch on the cell's detected type dispatches to a POI getter that throws — e.g. a FORMULA cell whose evaluation fails, or type detection disagreeing with the stored cell type.
Common situations: Spreadsheets containing formulas requiring evaluation that POI cannot resolve; cells with unsupported or malformed types; files produced by tools that write inconsistent cell type metadata.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Unable to get string content of cell (" +…
- Unable to get string content of cell (
- Read beyond last row: " + rownr
- A step in transformation [" + transMeta.toString() + "]…
- Database type not found!
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/bafc68e1915b422a.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/poi/PoiCell.java:93
case DATE:
// Timezone conversion needed since POI doesn't support this apparently
//
long time = cell.getDateCellValue().getTime();
long tzOffset = TimeZone.getDefault().getOffset( time );
return new Date( time + tzOffset );
case NUMBER_FORMULA:
case NUMBER:
return Double.valueOf( cell.getNumericCellValue() );
case STRING_FORMULA:
case LABEL:
return cell.getStringCellValue();
case EMPTY:
default:
return null;
}
} catch ( Exception e ) {
throw new RuntimeException( "Unable to get value of cell ("
+ cell.getColumnIndex() + ", " + cell.getRowIndex() + ")", e );
}
}
public String getContents() {
try {
Object value = getValue();
if ( value == null ) {
return null;
}
return value.toString();
} catch ( Exception e ) {
throw new RuntimeException( "Unable to get string content of cell ("
+ cell.getColumnIndex() + ", " + cell.getRowIndex() + ")", e );
}
}
public int getRow() {View on GitHub (pinned to f3058517a1)