{"record":{"id":"cca92a5fa58b17c9","repo":"pentaho/pentaho-kettle","slug":"sorry-spreadsheet-type-is-not-yet-supported","errorCode":null,"errorMessage":"Sorry, spreadsheet type  is not yet supported","messagePattern":"Sorry, spreadsheet type  is not yet supported","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/WorkbookFactory.java","lineNumber":46,"sourceCode":"\n  public static KWorkbook getWorkbook( Bowl bowl, SpreadSheetType type, String filename, String encoding )\n    throws KettleException {\n    return getWorkbook( bowl, type, filename, encoding, null );\n  }\n\n  public static KWorkbook getWorkbook( Bowl bowl, SpreadSheetType type, String filename, String encoding, String password )\n    throws KettleException {\n    switch ( type ) {\n      case JXL:\n        return new XLSWorkbook( bowl, filename, encoding );\n      case POI:\n        return new PoiWorkbook( bowl, filename, encoding, password ); // encoding is not used, perhaps detected automatically?\n      case SAX_POI:\n        return new StaxPoiWorkbook( filename, encoding );\n      case ODS:\n        return new OdfWorkbook( bowl, filename, encoding ); // encoding is not used, perhaps detected automatically?\n      default:\n        throw new KettleException( \"Sorry, spreadsheet type \" + type.getDescription() + \" is not yet supported\" );\n    }\n\n  }\n\n  // Not Dead Code:  Used by pdi-google-docs-plugin\n  @Deprecated\n  public static KWorkbook getWorkbook( SpreadSheetType type, InputStream inputStream, String encoding )\n    throws KettleException {\n    switch ( type ) {\n      case JXL:\n        return new XLSWorkbook( inputStream, encoding );\n      case POI:\n        return new PoiWorkbook( inputStream, encoding ); // encoding is not used, perhaps detected automatically?\n      case SAX_POI:\n        return new StaxPoiWorkbook( inputStream, encoding );\n      case ODS:\n        return new OdfWorkbook( inputStream, encoding ); // encoding is not used, perhaps detected automatically?\n      default:","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/WorkbookFactory.java#L28-L64","documentation":"WorkbookFactory.getWorkbook (file-based) throws when given a SpreadSheetType that has no case in its switch — i.e. a registered type the factory cannot instantiate. This indicates a configuration/metadata value outside the supported JXL/POI/SAX_POI/ODS set handled by this code path.","triggerScenarios":"A workbook object is requested with a SpreadSheetType whose switch case is missing (default branch), e.g. a type added in a newer version or an internally-reserved enum constant.","commonSituations":"Metadata written by a newer PDI version read by an older one; custom spreadsheet type plugins registered in metadata but not supported by the factory; corrupt spreadsheet_type value in repository/XML resolving to an unexpected enum.","solutions":["Set the step's Spreadsheet type to a supported engine: Excel (POI), Excel SAX (StaxPoi), or ODS","Align PDI versions so the metadata's spreadsheet type is known to the runtime","Fix a corrupted spreadsheet_type value in the .ktr or repository"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check the spreadsheet type before building the workbook\nif (type != SpreadSheetType.JXL && type != SpreadSheetType.POI\n && type != SpreadSheetType.SAX_POI && type != SpreadSheetType.ODS) {\n  throw new IllegalArgumentException(\"Unsupported spreadsheet type: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try {\n  KWorkbook wb = WorkbookFactory.getWorkbook(bowl, type, filename, encoding, password);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"not yet supported\")) {\n    wb = WorkbookFactory.getWorkbook(bowl, SpreadSheetType.POI, filename, encoding, password);\n  } else { throw e; }\n}","preventionTips":["Only configure engines listed in the step's Spreadsheet type dropdown","Avoid carrying metadata between PDI versions with different enum sets","Default new steps to POI for widest support"],"tags":["excel","enum","kettle"],"backgroundTag":"unsupported-enum-value","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"}