Reputation: 163
I want to know if there's any solution to integrate Google Sheets spreadsheet with a Firebase database.
The use case is having a spreadsheet file stored in Google Drive, where I want to automatically sync data with the Firebase database (JSON format), and upon updating the spreadsheet file, I want Firebase to refresh and update the data stored.
Upvotes: 9
Views: 2686
Reputation:
This seems to outline the solution: https://medium.com/firebase-developers/sheets-to-firebase-33132e31935b
As described in the blog post, the 2 will be populated with the same data and seamlessly update as changes are made.
Upvotes: 1
Reputation: 240
Agreed with you @Morfinismo. You might need to listen to edit event from the scripts and then communicate with the firebase from there
/**
* The event handler triggered when editing the spreadsheet.
* @param {Event} e The onEdit event.
*/
function onEdit(e) {
// update firebase from here
}
For more information on setting up googlescript check https://developers.google.com/apps-script/overview
For more information on connecting googlescript with firebase check https://sites.google.com/site/scriptsexamples/new-connectors-to-google-services/firebase
Upvotes: 1