This Google Apps Script project allows you to create a search bar functionality that can be used both within Google Sheets and as a standalone search bar in Google Sites.
- Open a custom menu in Google Sheets to access the search bar.
- Enter a value and search for it in Column A.
- Display the corresponding value from Column B below the search bar.
- A Google account
- A Google Sheets document
- A google sites
- Open your Google Sheets document.
- Click on "Extensions" > "Apps Script."
- Paste the provided Google Apps Script code into the script editor (Page.html and Code.gs).
- Save the project.
- Refresh your Google Sheets document.
- You will see a new "Custom Menu" option. Click on it.
- Click on "Open Search Bar" to open the search bar.
- Enter a value and click "Search."
- The result will be displayed below the search bar.
- Click on the deploy button (rocket icon) in the toolbar of the Apps Script editor.
- Choose a new version if prompted and set the access to "Anyone, even anonymous."
- Click "Deploy."
- Copy the provided web app URL.
- Open your Google Site.
- Edit the page where you want to add the search bar.
- Insert a new "Apps Script" gadget.
- Paste the copied web app URL into the gadget settings.
- Save the changes.
- The search bar is now embedded in your Google Site.
- Enter a value, click "Search," and view the result on the page.
- You can customize the appearance by modifying the HTML and CSS in the
Page.html
file.
This project is licensed under the MIT License - see the LICENSE file for details.