Convert Workflow Metadata to CSV

Hello,

is there a way to convert Workflow Metadata to CSV or JSON?
All my metadata fields are on document level and I have severel documents per job.

Thanks
Thomas

The following script saves the current metadata to an XML file:

var meta = new ActiveXObject("MetadataLib.metafile");
var metaName = Watch.GetMetadataFileName();
meta.LoadFromFile(metaName);
meta.Export("C:/Tests/MyMeta.xml",0);

Thank you Phil! Shame on me, I already used that code a few month ago. :roll_eyes: