Google 工作表 ImportXML 拆分定义
Google Sheets ImportXML Split Definitions
我为我的 ESL 学生制作了 Google Sheets Dictionary。我的问题是 sheet 正在提取多个定义。我希望它只从站点中提取 first/top 定义。我知道有办法解决这个问题,但似乎无法弄清楚。
=IFERROR(INDEX(SPLIT(CONCATENATE(IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,"//span[@class='def_text']")),":",FALSE,TRUE),1,1))
尝试:
=IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,
"//ul[@class='o_list verdana_font']")
更新:
=IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,
"//span[@class='def_text']")
或者如果你只想第一次尝试:
=INDEX(IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,
"//span[@class='def_text']"), 1, 1)
我为我的 ESL 学生制作了 Google Sheets Dictionary。我的问题是 sheet 正在提取多个定义。我希望它只从站点中提取 first/top 定义。我知道有办法解决这个问题,但似乎无法弄清楚。
=IFERROR(INDEX(SPLIT(CONCATENATE(IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,"//span[@class='def_text']")),":",FALSE,TRUE),1,1))
尝试:
=IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,
"//ul[@class='o_list verdana_font']")
更新:
=IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,
"//span[@class='def_text']")
或者如果你只想第一次尝试:
=INDEX(IMPORTXML("https://www.learnersdictionary.com/definition/"&A4,
"//span[@class='def_text']"), 1, 1)