This module provides the ability to Read Data from a google Spreadsheet.
Requirements:
If you don't use composer to install this module you will need to manually install the google api client.
composer require google/apiclient:^2.0
To use this module you need to enable the private file system
Configuration
Please follow the steps described in the "Set up your environment" section of
https://developers.google.com/sheets/api/quickstart/js to enable the api
Then create a Service Account and a key. Upload the created json file in:
/admin/config/spreadsheets/spreadsheetscredentials
Set up the sheet_id, range and sheet from wich you want to extract the data in:
/admin/config/services/googlesheets
After this you can retrieve the data with:
Drupal::service('spreadsheets_sheets.base')->getData();
there is also the possibility to programatically changing this configurations with the methods:
setSheetId(string $id), setRange(string $range) and setSheetName(string $name)
Usages
This module is useful if you have the necessity to extract values from googelsheets. If you have a large file that is constantly changing it has two major advantages to uploading the file and parsing it after.
- There wont be malformed files since you can define all the rules on the sheet itself wich ensures more integrity
- The googlesheet will track all the changes for you in the revisions
One example could be a products sheet with prices and descriptions that can be used to create any kind of entities or nodes.
| Attachment | Size |
|---|---|
| uploading credentials.json | 13.15 KB |
Project information
- Project categories: Developer tools
- Ecosystem: Google Spreadsheets Integration
76 sites report using this module
- Created by kallado on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Automated Drupal 11 compatibility fixes



