Google docs – Access text changes realtime

If a browser plugin is an appropriate way to deliver the feature, it should be possible to listen to changes that Google Docs makes to the DOM when it updates the page content. // This div contains all of the page content and not much else, in my rudimentary testing. var pageRoot = document.getElementsByClassName(‘kix-appview-editor’)[0].firstChild; var … Read more

JSON import to Excel

Since this is VBA, I’d use COM to call xmlhttprequest but use it in synchronous manner as not to upset VBA’s single threaded execution environment, A sample class that illustrates a post and get request in this manner follows: ‘BEGIN CLASS syncWebRequest Private Const REQUEST_COMPLETE = 4 Private m_xmlhttp As Object Private m_response As String … Read more

How to force newlines in Google Apps jsdoc descriptions

This method worked for me. In markdown (or in StackOverflow), you need to have two line breaks (ie an additional one) to start new line (or paragraph). same method worked for JSDoc /** * Converts the prefixed value to the specified base. * * Requires one of the following prefixes: * * ‘0b’ Base 2: … Read more

Is it possible to force a copy of a protected Google doc? [closed]

Here is how to copy (or print) the protected google sheet values. NOTE: With this technique you can copy the cells from each sheet; it’s not possible to duplicate the spreadsheet file itself. Formatting is preserved but formulas are not. Change the URL to: https://docs.google.com/spreadsheets/u/1/d/***[document id]***/preview The document ID is the random string found in … Read more

Download a spreadsheet from Google Drive / Workspace using Python

The https://github.com/burnash/gspread library is a newer, simpler way to interact with Google Spreadsheets, rather than the old answers to this that suggest the gdata library which is not only too low-level, but is also overly-complicated. You will also need to create and download (in JSON format) a Service Account key: https://console.developers.google.com/apis/credentials/serviceaccountkey Here’s an example of … Read more

Creating anchored comments programmatically in Google Docs

The Anchoring Comments feature from the Google Drive API is intended for non-Google Docs editors files, not for Google Documents. See https://youtu.be/ZBU52nacbLw?t=5m26s (credit to Bryan P who shared this URL through a comment) Unfortunatelly at this time the Document Service from Google Apps Script doesn’t include a Class Comment to handle comments and discussions. At … Read more

Insert date time in google document

This works well In Google Docs : Tools -> Open Script Editor and save this script function onOpen() { var ui = DocumentApp.getUi(); // Or FormApp or SpreadsheetApp. ui.createMenu(‘Custom Menu’) .addItem(‘Insert Date’, ‘insertDate’) .addToUi(); } function insertDate() { var cursor = DocumentApp.getActiveDocument().getCursor(); if (cursor) { // Attempt to insert text at the cursor position. If … Read more

Google Docs Viewer occasionally failing to load content in iframe

This is not fixing your problem per se, but since I had the same problem and I eventually managed to find an acceptable solution, I thought I’d share it. var $docViewer = $(`<iframe src=”https://stackoverflow.com/questions/35298724/${newValue}” height=”100%” width=”100%”></iframe>`); //If using modern browser, use and embed object if (window.chrome || typeof (window.mozInnerScreenX) != “undefined”) $docViewer = $(`<object width=”100%” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)