K
K
kyprijan2019-02-07 12:14:39
RSS
kyprijan, 2019-02-07 12:14:39

How to export google spreadsheet to rss?

How can I export google spreadsheet to rss? Tried through Html Service but authorization is needed to view the page and the reader does not see the page.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2019-02-07
@kyprijan

You must publish the script on your behalf for everyone on the Internet, then the reader will pick up the data sent by HtmlService.
If you are generating RSS into an HtmlService template then

function doGet() {
  return ContentService.createTextOutput(HtmlService.createTemplateFromFile("rss").evaluate().getContent())
          .setMimeType(ContentService.MimeType.RSS);
}

Or you can create a complete document using XmlService
function doGet() {
  var xml = XmlService.getPrettyFormat().format(document);
  return ContentService.createTextOutput(xml)
          .setMimeType(ContentService.MimeType.RSS);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question