Colab Tools for Google Sheets

Rory Pilgrim
Google Colab
Published in
2 min readAug 15, 2024

At Colab, we love Google Sheets! Sheets is a tool we use to bring data into our Colab notebooks or export results out. However, sometimes using Sheets and Colab can be a little cumbersome. In this blogpost we want to highlight two new tools that make using Colab and Sheets a breeze.

Sheets to Colab

Sheets to Colab is an add-on for Google Sheets that allows you to quickly get your Google Sheets data into Colab. With one click you can get the code to import data from a Google Sheet into a dataframe for use within Colab, or even open up a new Colab notebook with that import code already prefilled. See below for a video demonstration of the feature.

Interactive Sheets

With our new library, Interactive Sheets, you can also embed Google Sheets directly into your notebook, allowing you to stay inside the Colab UI without bouncing back and forth between Sheets and Colab. Interactive Sheets allows you to embed the Sheets UI directly into your notebook. This enables you to create, edit and export data by effortlessly transferring it between Google Sheets and a local pandas dataframe.

Interactive Sheets is useful in the following situations:

  • Use the Sheets GUI to create a static input variable rather than write out a table in code
  • Easily export your Colab results out to Google Sheets in a single line
  • Explore data and edit it within Google Sheets all within the Colab interface and even bring it back into Colab if you’d like

Pro tip:

  • Use a scratch cell to have a separate panel for your spreadsheet side-by-side with your notebook

Here’s a demo video if you’re curious to learn more! We also have a demo notebook in case you want to explore in a hands-on manner.

--

--