{"record":{"id":"17975665e9b31590","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-exceloutputmeta","errorCode":null,"errorMessage":"Unable to load step info from XML","messagePattern":"Unable to load step info from XML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/exceloutput/ExcelOutputMeta.java","lineNumber":899,"sourceCode":"      header_background_color =\n        getFontColorByCode( Const.NVL( XMLHandler.getTagValue( customnode, \"header_background_color\" ), \"\"\n          + FONT_COLOR_NONE ) );\n      header_row_height = XMLHandler.getTagValue( customnode, \"header_row_height\" );\n      header_alignment =\n        getFontAlignmentByCode( Const.NVL( XMLHandler.getTagValue( customnode, \"header_alignment\" ), \"\" ) );\n      header_image = XMLHandler.getTagValue( customnode, \"header_image\" );\n      // Row font\n      row_font_name = getFontNameByCode( Const.NVL( XMLHandler.getTagValue( customnode, \"row_font_name\" ), \"\" ) );\n      row_font_size = Const.NVL( XMLHandler.getTagValue( customnode, \"row_font_size\" ), \"\" + DEFAULT_FONT_SIZE );\n      row_font_color =\n        getFontColorByCode( Const.NVL( XMLHandler.getTagValue( customnode, \"row_font_color\" ), \"\"\n          + FONT_COLOR_BLACK ) );\n      row_background_color =\n        getFontColorByCode( Const.NVL( XMLHandler.getTagValue( customnode, \"row_background_color\" ), \"\"\n          + FONT_COLOR_NONE ) );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public String getNewLine( String fformat ) {\n    String nl = System.getProperty( \"line.separator\" );\n\n    if ( fformat != null ) {\n      if ( fformat.equalsIgnoreCase( \"DOS\" ) ) {\n        nl = \"\\r\\n\";\n      } else if ( fformat.equalsIgnoreCase( \"UNIX\" ) ) {\n        nl = \"\\n\";\n      }\n    }\n\n    return nl;\n  }\n\n  @Override","sourceCodeStart":881,"sourceCodeEnd":917,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/exceloutput/ExcelOutputMeta.java#L881-L917","documentation":"ExcelOutputMeta.loadXML parses the step's custom XML node (fonts, colors, etc.) and wraps any parsing failure in this KettleXMLException. It means the <step> XML for an Excel Output step could not be read — typically a malformed or unexpected XML structure in the .ktr file.","triggerScenarios":"The constructor/loadXML path hits an exception while calling XMLHandler.getTagValue on the custom node (e.g. node is null, wrong element names, invalid numeric color/font codes passed to getFontColorByCode).","commonSituations":"Hand-edited .ktr files; .ktr produced by a newer/older PDI version with a different XML schema; corrupted copy/paste of step XML between transformations; missing 'custom' node attributes.","solutions":["Inspect the wrapped cause to find which tag or value failed to parse.","Open the .ktr in Spoon and re-save the Excel Output step to regenerate canonical XML.","Compare the step's XML against a freshly created Excel Output step and fix mismatched/missing tags.","Confirm the PDI version that wrote the .ktr matches the runtime version; migrate via Spoon rather than manual edits.","Check that font/color code values in the XML are valid integers recognized by getFontColorByCode."],"exampleFix":"// before: hand-edited tag with invalid value\n<row_font_color>dark</row_font_color>\n// after: valid numeric color code\n<row_font_color>0</row_font_color>","handlingStrategy":"try-catch","validationCode":"Document doc = XMLHandler.loadXMLFile( new File( ktrPath ) );\n// validate Excel Output custom tags exist before loading\nNode stepNode = XMLHandler.getSubNode( doc, \"step\" );\nif ( stepNode == null ) throw new IllegalStateException( \"Malformed Excel Output XML\" );","typeGuard":null,"tryCatchPattern":"try { transMeta.loadXML( file, ... ); } catch ( KettleXMLException e ) { logError( \"Excel Output XML invalid: \" + e.getCause(), e ); }","preventionTips":["Never hand-edit .ktr XML; edit through Spoon.","Keep the PDI version that produced the .ktr aligned with the runtime version.","Version-control transformations so corrupted XML can be reverted."],"tags":["pentaho-kettle","excel-output","xml","serialization"],"backgroundTag":"schema-validation-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"}