Sync Excel data to Firebase Realtime Database || 2022

preview_player
Показать описание
*Step 1 : Create project in Firebase*
Click on “Get started” and create new project.
Once you create new project, click “Build” and select “Realtime Database”
Follow the instruction as shown in the video.

*Step 2: Create google sheet*
Open google sheet
Create new file and insert the data.
Publish the google to the web as shown in the video.
Once it is published, click “Extension” and select “Apps Script”

*Step 3: Connect to firebase*
Select “Initialize” near to Debug as shown in the video and follow the instruction to grant permission.
Check the firebase “Realtime Database” you can see the excel data imported to firebase.
Рекомендации по теме
Комментарии
Автор

Thank you! Solved my issue like a charm, thanks!! Learning lots more from you!

rose-
Автор

Thank you bro, much love! It works. August 2023

Gabriel-oobo
Автор

Thanks for tutorial bro.. Good tutorial... ❤️❤️

Azmiriyadin
Автор

Can use yhis method to send data from google sheet whose value depend on the input from an app which is also enabled using another app script

krizz
Автор

excellent synchronization of sheet to firebase
but from firebase to sheet it doesn't sync
¿some example?

carbajal
Автор

Thanks so much bro, but i want to make a sheet1 as a bucket of rtdb firebase, can you help me?

abuadzkauwais
Автор

how to connect microsoft excel with firebase ? also what if we want to add multiple files ?

mohamedayad
Автор

hello thank u for this video i have a question i want to do import and export at the same time but it did not work when i change somthing in firebase it does not change in the excel can u help me with that

rihem
Автор

do you know how to export text.exe file to firebase by automatically?

sabatstudio
Автор

Wow, amazing tutorial.
How can we convert the data in the firebase to visual analytical data? Like in terms of graphs and charts .

bonfaceosuka
Автор

I added an excel file to the previously created project but it is not showing even after i followed your steps sincerely.Please please help and respond asappp

malhaarshikhare
Автор

This video is wonderful! You are to be congratulated, however I made a small adjustment to the code so that it goes through all the tabs on import.

function getEnvironment() {
var environment = {
spreadsheetID: "replace with your keys",
firebaseUrl: "replace with your keys/",
};
return environment;
}

// Creates a Google Sheets on change trigger for the specific sheet
function {
var triggers =
var triggerExists = false;
for (var i = 0; i < triggers.length; i++) {
if == sheetID) {
triggerExists = true;
break;
}
}

if (!triggerExists) {
var spreadsheet =

.forSpreadsheet(spreadsheet)
.onChange()
.create();
}
}

// Delete all the existing triggers for the project
function deleteTriggers() {
var triggers =
for (var i = 0; i < triggers.length; i++) {

}
}

// Initialize
function initialize(e) {

}

// Write the data to the Firebase URL
function writeDataToFirebase(sheetID) {
var ss =


var sheets = ss.getSheets();

for (var i = 0; i < sheets.length; i++) {
importSheet(sheets[i]);
}

function importSheet(sheet) {
var name = sheet.getName();
var data =

var dataToImport = {};

for (var i = 1; i < data.length; i++) {
dataToImport[data[i][0]] = {};
for (var j = 0; j < data[0].length; j++) {
assign(dataToImport[data[i][0]], data[0][j].split("__"), data[i][j]);
}
}

var token = ScriptApp.getOAuthToken();

var firebaseUrl =
getEnvironment().firebaseUrl + sheet.getParent().getId() + "/" + name;
var base = FirebaseApp.getDatabaseByUrl(firebaseUrl, token);
base.setData("", dataToImport);
}

function assign(obj, keyPath, value) {
lastKeyIndex = keyPath.length - 1;
for (var i = 0; i < lastKeyIndex; ++i) {
key = keyPath[i];
if (!(key in obj)) obj[key] = {};
obj = obj[key];
}
obj[keyPath[lastKeyIndex]] = value;
}
}

alissonalbuquerque
Автор

sorry, i have a question. How do you add the library of FirebaseApp when 5:02? I have a problem that i can use id to add FirebaseApp libraries.

Belegendaryy
Автор

why is the appscript not working for me? is it because my database url is .app?

jezzahokuzai
Автор

how to add multiple table with data using google sheet to firebase

vinodhans
Автор

Hi, I have a sheet presenting cities and universities and so on. But when I add a new university with same city name it only shows the last university row in same city. Do you know how to fix that?

berkkemal
Автор

Can it, combined with koldular to load db

kuprxcreation
Автор

merhaba . Sayfa1 ve spreadsheetID adında bir klasör oluşturmasını istemiyorum. Benim id excell tablosundaki ilk sütun olmasını istiyorum nasıl yapabilirim. Teşekkürler

kitobnq
Автор

please, Can you show us how to retrieve database from Firebase to Google Sheets?

ismaildjennane
Автор

Sir if there are multiple excel tables the how we define url of deffrent tables

khalilahmed