pentaho/pentaho-kettle · error · RuntimeException
Unable to get value of cell (
Error message
Unable to get value of cell (
What it means
OdfCell.getValue wraps any exception while reading an ODS cell's typed value into a RuntimeException reporting the cell's column and row. The underlying ODF toolkit call failed, so the cell's value cannot be produced.
Solutions
- Open the .ods in LibreOffice and re-save it to normalize the cell XML
- Check the cell at the reported (column,row) for unusual formatting/value types and re-enter it plainly
- Verify the file is not truncated/corrupt (unzip the .ods and validate content.xml)
- Fall back to the POI-based or JXL engine if the sheet can be stored as .xlsx/.xls
Defensive patterns
Strategy: try-catch
Validate before calling
// Open the .ods as a zip to detect truncation/corruption before reading
try (ZipFile z = new ZipFile(odsFile)) {
if (z.getEntry("content.xml") == null) throw new IOException("content.xml missing — corrupt ODS");
} Try / catch
try {
Object v = cell.getValue();
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Unable to get value of cell")) {
log.warn("Falling back to getContents() for " + e.getMessage());
String text = cell.getContents();
} else { throw e; }
} Prevention
- Round-trip third-party ODS files through LibreOffice before ingestion
- Handle EMPTY/unusual value-type cells explicitly via getContents()
- Validate .ods integrity (zip structure) in an upstream step
When it happens
Trigger: During value extraction in getValue, the ODF cell throws (corrupt cell XML, unexpected value type in the ODS document, ODFDOM internal error); also triggered when the requested value type has no matching conversion case.
Common situations: ODS files produced by non-standard generators with malformed office:value attributes; percentage/currency cells whose value type doesn't map cleanly; damaged or partially downloaded .ods files.
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
- ArrayIndexOutOfBoundsException( rownr )
- Could not delete stale file " + buildFilename
- Error opening new file (logged), KettleException( e )
- Error writing field (posX,posY) (logged), KettleException(…
- ExcelInput.Exception.MissingRequiredFiles
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/930a91afd34bf618.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ods/OdfCell.java:104
case DATE:
// Timezone conversion needed since POI doesn't support this apparently
//
long time = cell.getDateValue().getTime().getTime();
long tzOffset = TimeZone.getDefault().getOffset( time );
return new Date( time + tzOffset );
case NUMBER_FORMULA:
case NUMBER:
return Double.valueOf( cell.getDoubleValue() );
case STRING_FORMULA:
case LABEL:
return cell.getStringValue();
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)