-
Notifications
You must be signed in to change notification settings - Fork 0
How To: Download and Install Code into Google Sheets
Nick Taylor edited this page Dec 21, 2023
·
3 revisions
* Open your web browser and go to the GitHub URL of the repository. This URL will typically follow the format: https://github.com/ATXNickTaylor/Honor-Sheets-Formatting.
* Once you are in the repository, you can either copy the code directly or download the files.
To copy a specific script:
1. Open the Desired Script File.
2. Click on the script file you wish to use from the list of files in the repository.
3. Click the "Raw" button near the top right of the file view.
4. Select all the code (Ctrl+A or Cmd+A) and copy it (Ctrl+C or Cmd+C).
5. Proceed to the Installing the Script in Google Sheets (If You Copied The Code) section.
To download the repository:
1. Click the green "Code" button near the top of the repository file list.
2. Select "Download ZIP".
3. Unzip the downloaded file on your computer.
4. Proceed to the Installing the Script in Google Sheets (If You Downloaded The Code - ZIP FILES OPTION) section.
Open Google Sheets:
1. Go to [Google Sheets](https://sheets.google.com/) and open a new or existing spreadsheet.
2. In the Google Sheets menu, click on Extensions > Apps Script.
3. On the right hand side of your screen, you may see a popup box that says "Your are currently signed in as: ". Select OK.
4. At the top of your screen, directly to the right of the words "App Script", you will see "Untitled Project". Click here and name your project something relevant. Press Enter.
5. In the middle of your screen, you will see a wide text box with numbered lines. Line 1 will read:
function myFunction() {
.6. Select all the code (Ctrl+A or Cmd+A) in that text box, and paste the code you copied from the GitHub repository. (Ctrl+V or Cmd+V).
7. Direct your attention back to line 1 of the code you pasted. Look above line 1 and you will see an icon in the shape of a floppy disk. Click that icon to save the code.
8. Directly to the left of line 1 of the code, you will see the following:
Code.gs
. This is the name of the script you just pasted. Change the name to match the name of the code you just copied.9. To do this, use your mouse and click where it says
Code.gs
and change the name to match. For example: if you copied the code PacificToCentral
, then you will type "PacificToCentral" here then press Enter.10. To add a new file within the project, click the + icon (Plus icon) right above the file name you just changed.
11. Repeat steps 5 through 10 for the remainder of the scripts within this repository.
12. Once finished, you will have 5 files in your project. The floppy disk icon should be grayed out. If so, you may exit the tab by clicking the X icon.
13. Your last step is to refresh your workbook by clicking the "Reload" icon.
14. You are now ready to use the new functions!
Open Google Sheets:
1. Go to [Google Sheets](https://sheets.google.com/) and open a new or existing spreadsheet.
2. In the Google Sheets menu, click on Extensions > Apps Script.
3. On the right hand side of your screen, you may see a popup box that says "Your are currently signed in as: ". Select OK.
4. At the top of your screen, directly to the right of the words "App Script", you will see "Untitled Project". Click here and name your project something relevant. Press Enter.
5. In the middle of your screen, you will see a wide text box with numbered lines. Line 1 will read:
function myFunction() {
.6. Open a downloaded file with a text editor (like Notepad, Sublime Text, Visual Studio Code, etc.).
6b. Select all the code (Ctrl+A or Cmd+A) and copy the code (Ctrl+C or Cmd+C).
7. Back in the Apps Script tab, in the middle of your screen where you see
function myFunction() {
, select all with Ctrl+A or Cmd+A, then paste the code you copied from the downloaded file. (Ctrl+V or Cmd+V).8. Direct your attention back to line 1 of the code you pasted. Look above line 1 and you will see an icon in the shape of a floppy disk. Click that icon to save the code.
9. Directly to the left of line 1 of the code, you will see the following:
Code.gs
. This is the name of the script you just pasted. Change the name to match the name of the code you just copied.10. To do this, use your mouse and click where it says
Code.gs
and change the name to match. For example: if you copied the code PacificToCentral
, then you will type "PacificToCentral" here then press Enter.11. To add a new file within the project, click the + icon (Plus icon) right above the file name you just changed.
12. Repeat steps 6 through 11 for the remainder of the scripts within this repository.
13. Once finished, you will have 5 files in your project. The floppy disk icon should be grayed out. If so, you may exit the tab by clicking the X icon.
14. Your last step is to refresh your workbook by clicking the "Reload" icon.
15. You are now ready to use the new functions!