Google Sheets Add-On

This add-on connects Google Sheets to the Trading Economics API, letting you pull live economic indicators, calendar events, forecasts, market data, and more directly into your spreadsheet.

Requirements

Step 1

Step 1 — Open the Apps Script Editor
  1. Open your Google Sheets spreadsheet.
  2. In the menu bar, go to Extensions → Apps Script.

The Apps Script editor will open in a new browser tab.

Extensions → Apps Script

Step 2

Step 2 — Add the Script Code
  1. In the Apps Script editor, click on the default Code.gs file in the left panel.
  2. Delete all existing content in the editor.
  3. Copy the full contents of Code.gs and paste it into the editor.
  4. Press Ctrl + S (or Cmd + S on Mac) to save.

Code.gs editor

Step 3

Step 3 — Configure the Manifest

The appsscript.json manifest declares the OAuth permissions the add-on needs to communicate with Google Sheets and the Trading Economics API.

  1. In the Apps Script editor, click Project Settings (the gear icon in the left panel).
  2. Check the box labelled “Show ‘appsscript.json’ manifest file in editor”.
  3. Go back to the Editor view — appsscript.json will now appear in the file list.
  4. Click on appsscript.json, delete all existing content, and paste in the following:
{
  "timeZone": "Etc/UTC",
  "dependencies": {},
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "oauthScopes": [
    "https://www.googleapis.com/auth/script.storage",
    "https://www.googleapis.com/auth/spreadsheets",
    "https://www.googleapis.com/auth/script.container.ui",
    "https://www.googleapis.com/auth/script.external_request"
  ]
}
  1. Press Ctrl + S (or Cmd + S on Mac) to save.

Step 4

Step 4 — Add the Sidebar HTML File
  1. In the Apps Script editor, click the + icon next to Files in the left panel and choose HTML.

Add HTML file

  1. Name the new file exactly Sidebar (the editor will append .html automatically).
  2. Delete all existing content in the new file.
  3. Copy the full contents of Sidebar.html and paste it into the editor.
  4. Press Ctrl + S (or Cmd + S on Mac) to save.

Sidebar.html editor

Step 5

Step 5 — Activate the Add-On
  1. Go back to your Google Sheets spreadsheet and refresh the page.
  2. After a few seconds, a new TE menu will appear in the menu bar.
  3. Click TE → Settings and enter your Trading Economics API key to start fetching data.

TE menu

Notes

Notes

1 - The first time you use the Add-On, a warning might appear stating “This app isn’t verified.”

  • Click on “Advanced”
  • Click on “Go to (project name) (unsafe)” to continue using our Add-On.

This warning appears because the script runs under your own Google account. The code is fully open source and visible in the repository.

Notes

2 - Ensure your spreadsheet has enough rows (10,000+) before making a request.

  • If you need more rows, scroll to the bottom and click “Add” to add more rows.