{"record":{"id":"06e49347080cc425","repo":"pentaho/pentaho-kettle","slug":"excelinput-exception-unsupportedtype","errorCode":"ExcelInput.Exception.UnsupportedType","errorMessage":"ExcelInput.Exception.UnsupportedType","messagePattern":"ExcelInput\\.Exception\\.UnsupportedType","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ExcelInput.java","lineNumber":360,"sourceCode":"            .getContents(), v.getTypeDesc() ) );\n        }\n        break;\n\n      case EMPTY:\n        // OK\n        break;\n\n      case NUMBER:\n        if ( !( v.getType() == ValueMetaInterface.TYPE_STRING\n          || v.getType() == ValueMetaInterface.TYPE_NONE || v.getType() == ValueMetaInterface.TYPE_INTEGER\n          || v.getType() == ValueMetaInterface.TYPE_BIGNUMBER || v.getType() == ValueMetaInterface.TYPE_NUMBER ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"ExcelInput.Exception.InvalidTypeNumber\", cell\n            .getContents(), v.getTypeDesc() ) );\n        }\n        break;\n\n      default:\n        throw new KettleException( BaseMessages.getString( PKG, \"ExcelInput.Exception.UnsupportedType\", cell\n          .getType().getDescription(), cell.getContents() ) );\n    }\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    meta = (ExcelInputMeta) smi;\n    data = (ExcelInputData) sdi;\n\n    if ( first ) {\n      first = false;\n\n      data.outputRowMeta = new RowMeta(); // start from scratch!\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n                      metaStore );\n\n      if ( meta.isAcceptingFilenames() ) {\n        // Read the files from the specified input stream...\n        data.files.getFiles().clear();","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ExcelInput.java#L342-L378","documentation":"ExcelInput throws this when a spreadsheet cell has a type the step cannot map to the requested Kettle value type. In checkType's switch over cell types, the default branch rejects any unrecognized CellType with a KettleException naming the cell's type description and contents. It guards the type-conversion contract between the Excel/ODS layer and Kettle ValueData.","triggerScenarios":"An Excel/ODS cell contains a cell type (e.g. an unsupported formula or unknown type) that hits the default case of the switch in checkType while fillRow is building the output row.","commonSituations":"Sheets saved by unusual producers with odd cell types; ODS/PDF or other spreadsheet types routed through a JXL-oriented pipeline; corrupted cells whose type cannot be classified.","solutions":["Inspect the cell at the reported contents and re-enter it as a standard number, date, text, or boolean cell","Set the step's field type so it matches the actual cell type","Switch the spreadsheet engine (e.g. from JXL to POI) in the step's Spreadsheet type settings, which supports more cell types","Enable 'ignore errors' on the step to skip bad cells if the data loss is acceptable"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before running, normalize the sheet: ensure cells are NUMBER/DATE/LABEL/BOOLEAN.\n// e.g. in LibreOffice/Excel re-save, or in a pre-step check:\nfor (Cell cell : row) {\n  if (!(cell instanceof NumberCell || cell instanceof DateCell\n     || cell instanceof LabelCell || cell instanceof BooleanCell)) {\n    throw new IllegalArgumentException(\"Unsupported cell type at row \" + rowIdx);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.processRow(smi, sdi);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"UnsupportedType\")) {\n    // log cell contents from message and skip/repair the row\n  } else { throw e; }\n}","preventionTips":["Keep source sheets to plain numbers, text, dates and booleans","Match the step's field type definitions to the actual sheet contents","Use the POI engine when JXL rejects modern cell types","Enable ignore-errors with cell-level error handling for dirty data"],"tags":["excel","cell-type","kettle"],"backgroundTag":"unsupported-operation","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"}