Is there a way to evaluate a formula that is stored in a cell?

No, there’s no equivalent to Excel’s EVALUATE() in Google Sheets. There’s long history behind this one, see this old post for instance. If you’re just interested in simple math (as shown in your question), that can be done easily with a custom function. function doMath( formula ) { // Strip leading “=” if there if … Read more

How to generate an uuid in google sheet?

Generate UUID You can generate a UUID using Utilities.getUuid(). But it is required to use a custom function because there are no functions for it in Google Sheet’s set of functions. In order to generate UUID, please do the following: Open the Google Apps Script editor. Copy and paste the following script and save it. … 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

New Google Sheets custom functions sometimes display “Loading…” indefinitely

Important Tip: Create multiple copies of your entire spreadsheet as you experiment. I have had 3 google spreadsheets corrupted and rendered completely in-accessible (stuck in a refresh loop). This has happened when I was experimenting with custom functions so YOU HAVE BEEN WARNED! You will want to try one or many of the following ways … Read more

Collapsing Elements in a Google Doc With Google Apps Script – Is This Possible?

You cannot do anything special in Apps Script, just automate stuff that you can do manually. So, there’s no way to do real collapsing, since there’s no such feature in Google Docs. But you can use available functionality in unorthodox ways and make it work for you. For example, you could save the content somewhere … Read more

Timezone conversion in a Google spreadsheet

Short answer There is no built-in function but you could build a custom function. Example /** * Converts a datetime string to a datetime string in a targe timezone. * *@param {“October 29, 2016 1:00 PM CDT”} datetimeString Date, time and timezone. *@param {“Timezone”} timeZone Target timezone *@param {“YYYY-MM-dd hh:mm a z”} Datetime format *@customfunction … Read more

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