I have a google docs spreadsheet and an XML file which is made on the base of this spreadsheet. What I need right now is a way to speed up exporting information to XML format. So I’ve turned to google scripts.
I can currently retrieve certain cells from a spreadsheet and make string variables, however I need to save the resulting strings to an XML file using minimum amount of clicks.
Is there any way to instantly make an xml file using google scripts and send it to download from the browser? The only way to save the result I’ve found is creating a plain text document in google drive folder, opening this document and manually copypasting it’s content to my xml file. But it seems that this plain text documents do not understand tab-characters (\t) and I kinda need them to make a certain structure in my xml.
Have you looked into Content Service? You would generate the XML and serve it via Content Service, set the XML mime-type, then use downloadAsFile to tell the browser to just download the file instead of displaying it.