Learn how to create an application that interacts with Google Sheets. This guide shows you how to access and display spreadsheet data using Python and pandas.

What you’ll learn

Google Sheets

Connect to spreadsheet data

Data Processing

Work with pandas dataframes

API Integration

Use Google’s API services

Authentication

Handle OAuth and service accounts

Create your app

1

Fork the template

Sign in to Replit and fork the Google Sheets to HTML Renderer. Select + Use Template and follow the prompts to create your Replit App.

2

Configure for public sheets

  1. Open main.py
  2. Replace WORKSHEET_URL with your Google Sheet URL
  3. Set require_auth=False for public sheets

A worksheet refers to a single tab in a Google Sheet. Make sure to use the correct tab’s URL.

3

Configure for private sheets

  1. Enable Google Sheets API access:
  2. Create a service account
  3. Add the service account JSON to your Replit App’s Secrets as SERVICE_ACCOUNT_JSON
  4. Share your sheet with the service account email

Service accounts provide secure, automated access to your sheets.

Deploy your app

1

Configure deployment

  1. Select Deploy in the workspace header
  2. Choose Reserved VM deployment
  3. Select Deploy
2

Test

Your app will be live in a few minutes. Test it by accessing the HTML endpoint in your browser.

Customization options

Data Processing

  • Modify data transformations
  • Add filtering options
  • Create custom views

Display

  • Customize HTML rendering
  • Add interactive features
  • Style your output

Next steps

Want to learn more about API integrations? Check out our deployment documentation.