Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 如何使用单个键和多个值链接数据_Google Apps Script_Google Sheets_Google Sheets Formula - Fatal编程技术网

Google apps script 如何使用单个键和多个值链接数据

Google apps script 如何使用单个键和多个值链接数据,google-apps-script,google-sheets,google-sheets-formula,Google Apps Script,Google Sheets,Google Sheets Formula,嘿,大家看下面的数据,我正在尝试链接第一列的值,这些值与其对应的值相同。我还尝试在Access中像数据库一样链接它们,但我将用它编写脚本,不能用script.gs访问外部信息,如JSON。所以我需要在我的谷歌表单中以本机方式完成这项工作 typeID BPO materialTypeID Mat quantity 180 Proton S 34 Tritanium 58 180 Proton S 35 Pyerite 23 180 Proton S 37 Isog

嘿,大家看下面的数据,我正在尝试链接第一列的值,这些值与其对应的值相同。我还尝试在Access中像数据库一样链接它们,但我将用它编写脚本,不能用script.gs访问外部信息,如JSON。所以我需要在我的谷歌表单中以本机方式完成这项工作

typeID  BPO materialTypeID  Mat quantity
180 Proton S    34  Tritanium   58
180 Proton S    35  Pyerite 23
180 Proton S    37  Isogen  1
181 Depleted Uranium S  34  Tritanium   118
181 Depleted Uranium S  36  Mexallon    1
181 Depleted Uranium S  37  Isogen  2
182 Titanium Sabot S    34  Tritanium   58
182 Titanium Sabot S    35  Pyerite 64
182 Titanium Sabot S    36  Mexallon    1
183 Fusion S    34  Tritanium   162
183 Fusion S    35  Pyerite 3
183 Fusion S    37  Isogen  3
184 Phased Plasma S 34  Tritanium   164
184 Phased Plasma S 35  Pyerite 17
184 Phased Plasma S 37  Isogen  3
185 EMP S   34  Tritanium   204
185 EMP S   35  Pyerite 17
185 EMP S   38  Nocxium 1

Here is what I am trying to end with :

181 Depleted Uranium S  34  Tritanium   118
    Depleted Uranium S  36  Mexallon    1
    Depleted Uranium S  37  Isogen  2
182 Titanium Sabot S    34  Tritanium   58
    Titanium Sabot S    35  Pyerite 64
    Titanium Sabot S    36  Mexallon    1
183 Fusion S    34  Tritanium   162
    Fusion S    35  Pyerite 3
    Fusion S    37  Isogen  3

etc......

从A2到E19的数据,例如:

=arrayformula( {left(A2:A19&"",1000* transpose(split(join("","1," & rept("0,",countif(A2:A19,"=" & unique(A2:A19))-1)),",",true,true))),B2:E19})

我还尝试使用查询打印出所有列=查询(A11:E25,“选择B、C、D、E,其中A连接器182”)或此=连接(查询(A11:E25,“选择B、C、D、E,其中A=”),A3)