Convert Google Sheets Worksheet IDs to GIDs and vice-versa

Using code from http://stackoverflow.com/a/26885636.

to

to