1

I am attempting to use xml2json-xslt to convert my Excel generated XML to JSON data. It is written in XSL 1.0 so I can run it from the browser and it works just fine. However I would like to include it in my workflow from Excel so I can automatically map my output without this additional step.

Is it possible to export XML from Excel and transform it using an XSL in one go?

NOTE: I am using the XML map export feature of Excel with a schema definition (XSD) and not saving in the default Excel schema.

George Reith
  • 133
  • 1
  • 7

1 Answers1

0

Is it possible to export XML from Excel and transform it using an XSL in one go?

Yes. Use the following process:

  • Export using the following script: Export Excel to XML in VBA

  • Invoke msxml on the output file using the following script: Convert XML to CSV with XSL

  • Replace c:\testme.xsl with xml2json.xslt

  • Replace c:\testme.xml with the output from the export from Excel

  • Combine both scripts into one file once they work separately