自动更新基于其他工作表的数据的表

时间:2019-07-30 15:52:08

标签: google-sheets transpose google-sheets-formula array-formulas google-sheets-query

如果我在一张纸上有这样的数据

@XmlRootElement(name = "parent")
public class Parent {

    @XmlElements({
        @XmlElement(name = "son", type = Son.class),
        @XmlElement(name = "daughter", type = Daughter.class)
    })
    protected List<Object> sonOrDaughter;

    ...
}

并且我想用它在另一个表中生成单独的表,以这样的方式显示该数据

value | key
============
apple |  1
pear  |  1
orange|  2
cat   |  2
dog   |  3

如果我更新了数据(例如cat:2-> cat:3),表格将自动更新

1 个答案:

答案 0 :(得分:0)

=ARRAYFORMULA(TRIM(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE({"♥"&QUERY(QUERY(A2:B, 
 "select B,count(B) where B is not null group by B pivot A", 0), 
 "select Col1 offset 1", 0), IF(QUERY(QUERY(A2:B, 
 "select count(B) where B is not null group by B pivot A", 0), 
 "offset 1", 0)<>"", "♥"&QUERY(A2:B, 
 "select count(B) where B is not null group by B pivot A limit 0", 0), )})
 ,,999^99))&"♥♦",,999^99), "♥♦"))))

0

相关问题