⭐Part 2: Starting from Scratch! Introduction to Google Sheets × JavaScript: 'Let's Create a Button'
Objective
Prepare a 'button-like' appearance in the spreadsheet.
Shapes/Images can be used to make them ready for script assignment later.
Open the file
The spreadsheet created last time (Part 1) was saved under the name 'Practice 1'. First, let's open Practice 1 from Google Drive. We will start this session's work from there.
Method A: Create using Drawing (Recommended)
In the spreadsheet menu, go to [Insert] -> [Drawing]

2. Place a rectangle -> Enter text (e.g., Run)


3. Click [Save and Close] in the top right -> It will be placed on the sheet
Use labels for the text like 'Run', 'Update', or 'Copy' so that what it does is clear at a glance.
Method B: Create using an image icon
Select [Insert] -> [Image] -> [Image over cells]
Upload and place an icon image
Very important: 'Image in cell' cannot be assigned a script. Always select 'Image over cells'.
Goal for this session
A visual button (shape or image) has been placed on the sheet
It doesn't work when pressed yet (we will connect it next time)
Common pitfalls (Part 2)
The 'image is in the cell' -> redo it and place it 'over the cells'
The text in the shape is too small -> Adjust the shape size or text size
Placed it in the way → Drag it to an empty space
Next Episode Preview
Write the script and assign it to the button → press it to run (initial authorization happens here).
#GoogleAppsScript #IntroductionToJavaScript #CloudUtilization #BeginnerProgramming #SpreadsheetAutomation
いいなと思ったら応援しよう!
🌿チップでの応援、ほんの少しでも嬉しいです。いただいたご支援は、新しい記事づくりの糧にします。