【问题标题】:How to Sync Google Sheets spreadsheet with the Firebase database?如何将 Google Sheets 电子表格与 Firebase 数据库同步?
【发布时间】:2016-12-01 08:26:03
【问题描述】:

我想知道是否有任何解决方案可以将 Google 表格电子表格与 Firebase 数据库集成。

用例是将电子表格文件存储在 Google 云端硬盘中,我希望在其中自动与 Firebase 数据库(JSON 格式)同步数据,并且在更新电子表格文件时,我希望 Firebase 刷新并更新存储的数据。

【问题讨论】:

  • 有人找到解决方案了吗?
  • @Awani 您使用的是什么编程语言?
  • 这可以通过谷歌应用脚​​本轻松完成。
  • 同意你@Morfinismo。
  • @Awani 我的解决方案能回答你的问题吗?

标签: firebase google-api google-sheets google-drive-api firebase-realtime-database


【解决方案1】:

同意你@Morfinismo。您可能需要监听脚本中的编辑事件,然后从那里与 firebase 进行通信

/**
 * The event handler triggered when editing the spreadsheet.
 * @param {Event} e The onEdit event.
 */
function onEdit(e) {
  // update firebase from here
}

有关设置 googlescript 检查的更多信息 https://developers.google.com/apps-script/overview

有关将 googlescript 与 firebase check 连接的更多信息 https://sites.google.com/site/scriptsexamples/new-connectors-to-google-services/firebase

【讨论】:

  • 嘿阿布巴克里,。我相信当时这个解决方案是不可能的。感谢您的评论。
  • 随时@mesmed。我们在一起
【解决方案2】:

这似乎概述了解决方案:https://medium.com/firebase-developers/sheets-to-firebase-33132e31935b

如博文中所述,这 2 个将填充相同的数据,并随着更改的进行无缝更新。

【讨论】:

    猜你喜欢
    • 2017-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多