{"record":{"id":"5f6e7786e72016c3","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-excelwriterstepmeta","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/excelwriter/ExcelWriterStepMeta.java","lineNumber":768,"sourceCode":"      for ( int i = 0; i < nrfields; i++ ) {\n        Node fnode = XMLHandler.getSubNodeByNr( fields, \"field\", i );\n\n        outputFields[i] = new ExcelWriterStepField();\n        outputFields[i].setName( XMLHandler.getTagValue( fnode, \"name\" ) );\n        outputFields[i].setType( XMLHandler.getTagValue( fnode, \"type\" ) );\n        outputFields[i].setFormat( XMLHandler.getTagValue( fnode, \"format\" ) );\n        outputFields[i].setTitle( XMLHandler.getTagValue( fnode, \"title\" ) );\n        outputFields[i].setTitleStyleCell( XMLHandler.getTagValue( fnode, \"titleStyleCell\" ) );\n        outputFields[i].setStyleCell( XMLHandler.getTagValue( fnode, \"styleCell\" ) );\n        outputFields[i].setCommentField( XMLHandler.getTagValue( fnode, \"commentField\" ) );\n        outputFields[i].setCommentAuthorField( XMLHandler.getTagValue( fnode, \"commentAuthorField\" ) );\n        outputFields[i].setFormula( XMLHandler.getTagValue( fnode, \"formula\" ) != null\n          && XMLHandler.getTagValue( fnode, \"formula\" ).equalsIgnoreCase( \"Y\" ) );\n        outputFields[i].setHyperlinkField( XMLHandler.getTagValue( fnode, \"hyperlinkField\" ) );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  private boolean getBooleanValue( Node node, String tag, boolean defaultValue ) {\n    String value = XMLHandler.getTagValue( node, tag );\n    return Optional.ofNullable( value ).filter( StringUtils::isNotBlank ).map( val -> \"Y\".equals( val ) ).orElse( defaultValue );\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    }","sourceCodeStart":750,"sourceCodeEnd":786,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelwriter/ExcelWriterStepMeta.java#L750-L786","documentation":"ExcelWriterStepMeta.loadXML wraps any exception raised while parsing the step's XML node in a KettleXMLException with this generic message. It means the <step> XML fragment for the Excel Writer step is malformed or missing expected fields.","triggerScenarios":"Loading a .ktr file whose ExcelWriterStep node is corrupt, hand-edited, or produced by an incompatible Pentaho version (missing/renamed tags like 'formula', 'hyperlinkField').","commonSituations":"Opening transformations from older/newer PDI versions; merging KTR files in version control; corrupted XML from partial writes.","solutions":["Open the .ktr in a text editor and validate the ExcelWriterStep XML block against a known-good transformation","Recreate the step in Spoon to regenerate correct XML","Check PDI version compatibility; export the transformation from the version that created it"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// validate XML well-formedness before load\nDocumentBuilderFactory.newInstance().newDocumentBuilder().parse( new File( ktrPath ) );","typeGuard":null,"tryCatchPattern":"try { transMeta.loadXml( file ); } catch ( KettleXMLException e ) { log.error( \"Corrupt step XML: \" + e.getCause(), e ); }","preventionTips":["Don't hand-edit .ktr files; edit in Spoon","Store transformations in version control as whole files, not merged fragments","Keep PDI versions consistent across teams"],"tags":["xml","pdi","metadata","deserialization"],"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"}