每个 URL 中的 importhtml 不同数量的列会抛出错误并进一步需要 move/shuffle 列
importhtml different number of columns in each URL throws error & further need to move/shuffle columns
我正在尝试导入具有不同列数的 tables。这导致错误“在 ARRAY_LITERAL 中,数组文字缺少一行或多行的值”似乎列数应该相同。
此外,我需要有关输出中第二个 URL table 的帮助:
a) B 列应该在 G“H”列
b) 像第二个 URL table 输出那样打乱列,C、D 列应该在 B、C 列中。 E、F 列应为 F、E。 )
附上sheethere
你的第二个导入 table 输出 #N/A 所以你实际上将 6 列放入数组中,一个 column/one 单元格
如果你想继续使用:
=QUERY({
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-top-gainers/", "table", 2),
"where Col1 is not null", 1), {"","","","","",""});
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-buyers/", "table", 2),
"where Col1 is not null offset 1", 0), {"","","","","",""})},
"where Col1 is not null", 0)
更新:
=QUERY({
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-top-gainers/", "table", 2),
"select Col1,' ',Col2,Col3,Col4,Col5,Col6
where Col1 is not null
label ' ''Bid Qty'", 1), {"","","","","",""});
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-buyers/", "table", 2),
"where Col1 is not null offset 1", 0), {"","","","","","",""})},
"where Col1 is not null", 1)
我正在尝试导入具有不同列数的 tables。这导致错误“在 ARRAY_LITERAL 中,数组文字缺少一行或多行的值”似乎列数应该相同。
此外,我需要有关输出中第二个 URL table 的帮助:
a) B 列应该在 G“H”列
b) 像第二个 URL table 输出那样打乱列,C、D 列应该在 B、C 列中。 E、F 列应为 F、E。 )
附上sheethere
你的第二个导入 table 输出 #N/A 所以你实际上将 6 列放入数组中,一个 column/one 单元格
如果你想继续使用:
=QUERY({
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-top-gainers/", "table", 2),
"where Col1 is not null", 1), {"","","","","",""});
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-buyers/", "table", 2),
"where Col1 is not null offset 1", 0), {"","","","","",""})},
"where Col1 is not null", 0)
更新:
=QUERY({
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-top-gainers/", "table", 2),
"select Col1,' ',Col2,Col3,Col4,Col5,Col6
where Col1 is not null
label ' ''Bid Qty'", 1), {"","","","","",""});
IFERROR(QUERY(IMPORTHTML(
"https://www.financialexpress.com/market/stock-market/nse-buyers/", "table", 2),
"where Col1 is not null offset 1", 0), {"","","","","","",""})},
"where Col1 is not null", 1)