On 04/08/2022 16:59, Roger L Costello wrote:
> Hi Folks,
>
> I have a plain, vanilla XML document with a root element that
> contains a bunch of <row> elements and each <row> element contains
> fields, e.g.,
>
> <document>
> <row>
> <field1>ABC</field1>
> <field2>DEF</field2>
> <field3>GHI</field3>
> </row>
> ...
> </document>
>
> To display that XML document in Excel requires a bunch of steps:
[...]
> Phew! That's a lot of work to get Excel to display the XML document.
Nobody does that. At least, not that I know of.
> Is there a tool that takes a plain, vanilla XML document and converts it into an Excel document?
You either write a few lines of XSLT or use one of the XML utilities, eg
lxprintf (from the LTXML2 toolkit):
$ lxprintf -e row "%s,%s,%s\n" field1 field2 field3 doc.xml >doc.csv
or even the utility I wrote in 1996 (updated 2006) to do this using only
the ESIS output of the onsgmls parser and a copy of awk, see
http://xml.ailmaril.ie/software/xml2csv.zip
Peter