Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Google Sheets Table

No security coverage Under active development 2 sites

This module adds a field type that converts a Google Sheet into an HTML table. It can automatically update the table in Drupal when changes are made to the linked Google Sheet.

What does it do?

Field type

This module provides a new field type called "Google sheets table" which accepts a Google sheet spreadsheet ID and converts it into an HTML table. This HTML is stored in the database and can be rendered like a text field, exported to a decoupled app or used however else you like!

Cron task

Additionally, it provides a cron task that automatically checks if the linked Google sheets have any new revisions and updates the respective HTML tables in the database.

How do I authenticate this module with Google?

Follow Google's instructions to create a user-managed Service account. Create a key for this Service account (choose JSON) and download the JSON file. Then store the JSON file as a multi-value key using the Key module. On your Drupal site, go to /admin/config/services/google-sheets-table and choose the Key you just created as the Google sheets API key. Now the module can view any Google sheets that the Service account has access to. Note that this module does not require write permissions and will only ever read data from Google sheets.

What is a spreadsheet ID?

The spreadsheet ID is the randomized string of characters in the url of the spreadsheet after /spreadsheets/d/. For example, this spreadsheet https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs... has an ID of 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms.
See the official Google Sheets API for more information on their terminology.

What Google sheet data is converted to HTML

This module focuses on formatted cell values. For example, if a cell's data is 1.5 but it is set to format as US currency, then it will be converted to <td>$1.50</td>. Charts, images and other media are not supported. Bold formatting is converted to the <b> tag and italics are converted to the <em> tag. Links are also fully supported as <a> tags. However, the font, font-size, color, background-color, border and alignment of a cell is ignored. The text format is configurable so that any unwanted tags can be stripped in the rendered table.

Logo image credits:

Drupal 9–10 · not 11

Ask your assistant about Google Sheets Table

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
May 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.2 Stable 9–10 May 8, 2023
1.0.1 Stable 9–10 May 1, 2023