Convert Unix Epoch Time to Date in Google Sheets

The simplest way, not requiring any JS programming, would be through a formula, dividing by 86400 seconds per day and adding to January 1, 1970. For example the following gives 21 July 2017: =1500598288 / 86400 + DATE(1970, 1, 1) To convert a whole column of numbers, just use ARRAYFORMULA: =ARRAYFORMULA(A:A / 86400 + DATE(1970, … Read more

Refresh data retrieved by a custom function in Google Sheet

Ok, it seems like my problem was that google behaves in a weird way – it doesn’t re-run the script as long as the script parameters are similar, it uses cached results from the previous runs. Hence it doesn’t re-connect to the API and doesn’t re-fetch the price, it simply returns the previous script result … Read more

Convert column index into corresponding column letter

I wrote these a while back for various purposes (will return the double-letter column names for column numbers > 26): function columnToLetter(column) { var temp, letter=””; while (column > 0) { temp = (column – 1) % 26; letter = String.fromCharCode(temp + 65) + letter; column = (column – temp – 1) / 26; } … Read more

How to number the headings in a Google Docs/Drive document?

If you want something more easy, there is a Google Add-On called “Table of Contents” that will allow you to number your headings. To install this add-on: Click on the Add-Ons > Get Add-Ons. Click on the “Table of Contents” icon or search for this addon to install it Then your Table of Contents should … Read more

How to debug Google Apps Script (aka where does Logger.log log to?)

UPDATE: As written in this answer, Stackdriver Logging is the preferred method of logging now. Use console.log() to log to Stackdriver. Logger.log will either send you an email (eventually) of errors that have happened in your scripts, or, if you are running things from the Script Editor, you can view the log from the last … Read more