【发布时间】:2021-04-01 14:33:55
【问题描述】:
我有两个 Google 表格位于同一个电子表格对象中,作为参考,我将它们称为数据和变更日志。
Data Sheet
ID Country Attribute Value
1 USA X 100
2 RUS X 77
3 MEX Y 32
4 GER Z 111
...
Change-Log Sheet
Country Attribute Value
USA X 84
GER Z 97
Updated Data Sheet
ID Country Attribute Value
1 USA X 84
2 RUS X 77
3 MEX Y 32
4 GER Z 97
...
目前我正在通过 API 提取数据表,该 API 每月都会清除和更新。
理想情况下,我想编写某种辅助函数,可以查询数据表以获取两个表之间共享的条目,并用更改日志中的相应值覆盖数据表中的值。
在上面的示例中,我想查询 Country 和 Indicator 变量在哪里相同,然后比较 Value 变量并通过在适当的数据表中覆盖该值来优先选择 Change-Log.Value 条目。
【问题讨论】:
-
您能否展示您已经尝试过的任何工作以及任何记录的错误或问题?
-
很遗憾,我无法理解
Ideally I would like to write some sort of helper function that can parse through the Data sheet and update the value based upon shared criteria from both sheets. I would like to make this exclusively with JS code, and trigger the function after the monthly updating of data from the API I am using.。我为此道歉。我可以问一下您当前问题的详细信息和您的目标吗?
标签: javascript google-apps-script google-sheets google-sheets-api