Give Office Scripts access to an XML library
Most of our VBA macro spreadsheets involve generating XML imports for other programs. I would prefer to move to Office Scripts and One Drive, but cannot find an interface to build an XML document like the DOM API.
Thank you for adding your request.
Couple of clarification questions to help understand the ask:
- Is the goal to generate XML document from the script? How will the XML be passed to the other programs? Do you intend to use Power Automate flows for that?
- Could you please elaborate on which specific DOM APIs are you looking for?
const doc = document.implementation.createDocument("", "", null);
const peopleElem = doc.createElement(“people”);
suramam @ microsoft . com
James Lee commented
Give feedback at https://aka.ms/oscripts
Hi Sudhi, thanks for the reply.
Ideally I would want to just download a file or write it into a cell so I can copy and paste into a file. The other software uses a file to import. The document.implementation API above would be excellent. The methods createElement, createAttribute, createTextNode, createCDATASection would work for all of my use-cases.