pentaho/pentaho-kettle · error · KettleException
Sorry, spreadsheet type is not yet supported
Error message
Sorry, spreadsheet type is not yet supported
What it means
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.
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
Defensive patterns
Strategy: validation
Validate before calling
// Check the spreadsheet type before building the workbook
if (type != SpreadSheetType.JXL && type != SpreadSheetType.POI
&& type != SpreadSheetType.SAX_POI && type != SpreadSheetType.ODS) {
throw new IllegalArgumentException("Unsupported spreadsheet type: " + type);
} Try / catch
try {
KWorkbook wb = WorkbookFactory.getWorkbook(bowl, type, filename, encoding, password);
} catch (KettleException e) {
if (e.getMessage().contains("not yet supported")) {
wb = WorkbookFactory.getWorkbook(bowl, SpreadSheetType.POI, filename, encoding, password);
} else { throw e; }
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Calculator.Log.UnknownCalculationType + fn.getCalcType()
- CheckSum.Error.UnknownChecksumType
- Could not delete stale file " + buildFilename
- Error opening new file (logged), KettleException( e )
- Error writing field (posX,posY) (logged), KettleException(…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/cca92a5fa58b17c9.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/WorkbookFactory.java:46
public static KWorkbook getWorkbook( Bowl bowl, SpreadSheetType type, String filename, String encoding )
throws KettleException {
return getWorkbook( bowl, type, filename, encoding, null );
}
public static KWorkbook getWorkbook( Bowl bowl, SpreadSheetType type, String filename, String encoding, String password )
throws KettleException {
switch ( type ) {
case JXL:
return new XLSWorkbook( bowl, filename, encoding );
case POI:
return new PoiWorkbook( bowl, filename, encoding, password ); // encoding is not used, perhaps detected automatically?
case SAX_POI:
return new StaxPoiWorkbook( filename, encoding );
case ODS:
return new OdfWorkbook( bowl, filename, encoding ); // encoding is not used, perhaps detected automatically?
default:
throw new KettleException( "Sorry, spreadsheet type " + type.getDescription() + " is not yet supported" );
}
}
// Not Dead Code: Used by pdi-google-docs-plugin
@Deprecated
public static KWorkbook getWorkbook( SpreadSheetType type, InputStream inputStream, String encoding )
throws KettleException {
switch ( type ) {
case JXL:
return new XLSWorkbook( inputStream, encoding );
case POI:
return new PoiWorkbook( inputStream, encoding ); // encoding is not used, perhaps detected automatically?
case SAX_POI:
return new StaxPoiWorkbook( inputStream, encoding );
case ODS:
return new OdfWorkbook( inputStream, encoding ); // encoding is not used, perhaps detected automatically?
default:View on GitHub (pinned to f3058517a1)