pentaho/pentaho-kettle · error · KettleException
ExcelInput.Exception.InvalidTypeNumber
ExcelInput.Exception.InvalidTypeNumber
Error message
ExcelInput.Exception.InvalidTypeNumber
What it means
ExcelInput.checkType() throws this KettleException when an Excel cell contains a NUMBER but the field's declared target type is not String, None, Integer, BigNumber, or Number. A numeric cell cannot be fed to Boolean, Date, or other incompatible types.
Solutions
- Change the field's Type to Number, Integer, BigNumber, or String in the Excel Input step dialog
- If a Date is expected, fix the sheet cell formatting to a real date (Excel stores dates as numbers) and keep the field type as Date
- Read as Number and convert downstream (Calculator / Select values) if a different type is required
- Preview rows to confirm detected cell types before executing the transformation
Example fix
// before field: columnName=created, type=Date // Excel cell is a raw number // after field: columnName=created, type=Number // then convert serial to date downstream // or fix the Excel column format to a Date type
Defensive patterns
Strategy: validation
Validate before calling
int cellType = cell.getType();
int fieldType = v.getType();
boolean ok = cellType == KCellType.NUMBER
&& ( fieldType == ValueMetaInterface.TYPE_STRING
|| fieldType == ValueMetaInterface.TYPE_NONE
|| fieldType == ValueMetaInterface.TYPE_INTEGER
|| fieldType == ValueMetaInterface.TYPE_BIGNUMBER
|| fieldType == ValueMetaInterface.TYPE_NUMBER );
if ( !ok ) { /* fix field type or sheet cell formatting */ } Type guard
boolean acceptsNumberCell( ValueMetaInterface v ) {
int t = v.getType();
return t == ValueMetaInterface.TYPE_STRING
|| t == ValueMetaInterface.TYPE_NONE
|| t == ValueMetaInterface.TYPE_INTEGER
|| t == ValueMetaInterface.TYPE_BIGNUMBER
|| t == ValueMetaInterface.TYPE_NUMBER;
} Try / catch
try {
row = excelInput.fillRow( cells, ... );
} catch ( KettleException e ) {
if ( e.getMessage().contains( "InvalidTypeNumber" ) ) {
// change the field to Number/String or fix the sheet to emit real dates
}
} Prevention
- Remember Excel stores dates as numeric serials — set field types accordingly
- Keep numeric columns typed as Number/Integer/BigNumber in step metadata
- Preview rows to detect cell type drift after sheet edits
When it happens
Trigger: fillRow() encounters a numeric cell while the mapped field is declared as Boolean, Date, or another non-numeric-accepting type in the Excel Input step metadata.
Common situations: A column that previously contained dates/text now contains numeric serial numbers or values, while the field is still typed as Date or Boolean.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- ExcelInput.Exception.InvalidTypeBoolean
- ExcelInput.Exception.InvalidTypeDate
- ExcelInput.Exception.InvalidTypeLabel
- GPLoadDataOutput.Exception.TypeNotSupported
- MondrianInputErrorUnhandledType
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/600d56905e5125b5.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ExcelInput.java:354
case LABEL:
if ( v.getType() == ValueMetaInterface.TYPE_BOOLEAN
|| v.getType() == ValueMetaInterface.TYPE_DATE || v.getType() == ValueMetaInterface.TYPE_INTEGER
|| v.getType() == ValueMetaInterface.TYPE_NUMBER ) {
throw new KettleException( BaseMessages.getString( PKG, "ExcelInput.Exception.InvalidTypeLabel", cell
.getContents(), v.getTypeDesc() ) );
}
break;
case EMPTY:
// OK
break;
case NUMBER:
if ( !( v.getType() == ValueMetaInterface.TYPE_STRING
|| v.getType() == ValueMetaInterface.TYPE_NONE || v.getType() == ValueMetaInterface.TYPE_INTEGER
|| v.getType() == ValueMetaInterface.TYPE_BIGNUMBER || v.getType() == ValueMetaInterface.TYPE_NUMBER ) ) {
throw new KettleException( BaseMessages.getString( PKG, "ExcelInput.Exception.InvalidTypeNumber", cell
.getContents(), v.getTypeDesc() ) );
}
break;
default:
throw new KettleException( BaseMessages.getString( PKG, "ExcelInput.Exception.UnsupportedType", cell
.getType().getDescription(), cell.getContents() ) );
}
}
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
meta = (ExcelInputMeta) smi;
data = (ExcelInputData) sdi;
if ( first ) {
first = false;
data.outputRowMeta = new RowMeta(); // start from scratch!View on GitHub (pinned to f3058517a1)