{"record":{"id":"930a91afd34bf618","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-value-of-cell","errorCode":null,"errorMessage":"Unable to get value of cell (","messagePattern":"Unable to get value of cell \\(","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ods/OdfCell.java","lineNumber":104,"sourceCode":"        case DATE:\n          // Timezone conversion needed since POI doesn't support this apparently\n          //\n          long time = cell.getDateValue().getTime().getTime();\n          long tzOffset = TimeZone.getDefault().getOffset( time );\n\n          return new Date( time + tzOffset );\n        case NUMBER_FORMULA:\n        case NUMBER:\n          return Double.valueOf( cell.getDoubleValue() );\n        case STRING_FORMULA:\n        case LABEL:\n          return cell.getStringValue();\n        case EMPTY:\n        default:\n          return null;\n      }\n    } catch ( Exception e ) {\n      throw new RuntimeException( \"Unable to get value of cell (\"\n        + cell.getColumnIndex() + \", \" + cell.getRowIndex() + \")\", e );\n    }\n  }\n\n  public String getContents() {\n    try {\n      Object value = getValue();\n      if ( value == null ) {\n        return null;\n      }\n      return value.toString();\n    } catch ( Exception e ) {\n      throw new RuntimeException( \"Unable to get string content of cell (\"\n        + cell.getColumnIndex() + \", \" + cell.getRowIndex() + \")\", e );\n    }\n  }\n\n  public int getRow() {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ods/OdfCell.java#L86-L122","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Open the .ods as a zip to detect truncation/corruption before reading\ntry (ZipFile z = new ZipFile(odsFile)) {\n  if (z.getEntry(\"content.xml\") == null) throw new IOException(\"content.xml missing — corrupt ODS\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  Object v = cell.getValue();\n} catch (RuntimeException e) {\n  if (e.getMessage().startsWith(\"Unable to get value of cell\")) {\n    log.warn(\"Falling back to getContents() for \" + e.getMessage());\n    String text = cell.getContents();\n  } else { throw e; }\n}","preventionTips":["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"],"tags":["ods","cell","excel","odf"],"backgroundTag":"file-read-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}