Arrays 加入importxml&;通过大括号导入TML
此公式在Arrays 加入importxml&;通过大括号导入TML,arrays,google-sheets,google-sheets-formula,array-formulas,google-sheets-importxml,Arrays,Google Sheets,Google Sheets Formula,Array Formulas,Google Sheets Importxml,此公式在A1中: = { {"LINK DA FOTO","LINK DO PERFIL"} ; {"LINK DA FOTO","LINK DO PERFIL"} ; ArrayFormula(SEERRO(PROCH(1,{1;IMPORTXML('Time Casa'!B12,"//table[@class='table squad sortable']//td[@class='photo']/a/img/@src | //table[@class='table squad sortabl
A1
中:
=
{
{"LINK DA FOTO","LINK DO PERFIL"}
;
{"LINK DA FOTO","LINK DO PERFIL"}
;
ArrayFormula(SEERRO(PROCH(1,{1;IMPORTXML('Time Casa'!B12,"//table[@class='table squad sortable']//td[@class='photo']/a/img/@src | //table[@class='table squad sortable']//td[@class='name large-link']/a/@href")},(LIN($A$1:$A$52)+1)*2-TRANSPOR(sort(LIN($A$1:$A$2)+0,1,0)))))
}
此公式在C1
中:
=
{TRANSPOR(IMPORTXML(
'Time Casa'!B12,"
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th/img/@title |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[6]/span |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[5] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[3] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[4] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[1] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[2]
"))
;
IMPORTHTML('Time Casa'!B12,"table","1")
}
结果:
通过在Sheet2
中这样组合,它工作得非常完美,结果与上图完全相同
=
{
Sheet3!A:B
,
Sheet3!C:S
}
但是,当通过我在下面使用的相同公式进行连接时,它会给出错误并显示↓
函数数组_行参数2的行长度不匹配。预期54
并且有:39
我想知道我需要调整什么才能使它工作,我试图使用=FILTER(X,X“”)
,但同样的错误仍然存在。链接到电子表格:
试试:
={{{"LINK DA FOTO", "LINK DO PERFIL"};
{"LINK DA FOTO", "LINK DO PERFIL"};
ARRAYFORMULA(QUERY(IFERROR(HLOOKUP(1, {1; IMPORTXML('Time Casa'!B12,
"//table[@class='table squad sortable']//td[@class='photo']/a/img/@src |
//table[@class='table squad sortable']//td[@class='name large-link']/a/@href")},
(ROW($A$1:$A$52)+1)*2-TRANSPOSE(SORT(ROW($A$1:$A$2)+0, 1, 0)))),
"where Col1 is not null"))},
{TRANSPOSE(IMPORTXML('Time Casa'!B12,
"//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th/img/@title |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[6]/span |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[5] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[3] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[4] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[1] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[2]"));
IMPORTHTML('Time Casa'!B12, "table", "1")}}
={{{"LINK DA FOTO", "LINK DO PERFIL"};
{"LINK DA FOTO", "LINK DO PERFIL"};
ARRAYFORMULA(QUERY(IFERROR(HLOOKUP(1, {1; IMPORTXML('Time Casa'!B12,
"//table[@class='table squad sortable']//td[@class='photo']/a/img/@src |
//table[@class='table squad sortable']//td[@class='name large-link']/a/@href")},
(ROW($A$1:$A$52)+1)*2-TRANSPOSE(SORT(ROW($A$1:$A$2)+0, 1, 0)))),
"where Col1 is not null"))},
{TRANSPOSE(IMPORTXML('Time Casa'!B12,
"//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th/img/@title |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[6]/span |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[5] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[3] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[4] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[1] |
//*[@id='page_team_1_block_team_squad_3-table']/thead/tr/th[2]"));
IMPORTHTML('Time Casa'!B12, "table", "1")}}