SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

⭐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)

  1. 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

  1. Select [Insert] -> [Image] -> [Image over cells]

  2. 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

いいなと思ったら応援しよう!

風369 🌿チップでの応援、ほんの少しでも嬉しいです。いただいたご支援は、新しい記事づくりの糧にします。