I’ve been writing a journal in Google Docs for over a year now and I wanted to do some text analysis on what I’ve been writing about. Paste the following script to the editor [code]function onOpen() { var ui = DocumentApp.getUi(); // Or FormApp or SpreadsheetApp. Ui Dialogs can not be called by time triggered functions, they have to be triggered by a user action, that's to say a click on a menu item or some sort of button that calls the function showing the UI. Introduction. From Google Docs , select Tools menu and click Open Script Editor. Exporting a Google Document as CSV for Text Analysis 2018/09/24. Sidebars in Google Docs So as of May 22, from the I/O Google (you can watch it here) released an API (or maybe an SDK, I ... var ui = DocumentApp.getUi(); var html = HtmlService.createHtmlOutputFromFile('index').setTitle('My Custom Comments').setWidth(300); ui.showSidebar(html);} Now the important part of this script to run is I need to add the html file to the … Rather than importing the document as html and formatting the dataframe all in R, I decided to make a Google Docs add-on to export any text document as a CSV file. | 1 Answers. up vote 1 down vote ---Accepted---Accepted---Accepted---.