[英]IMPORTXML in Google Sheets syntax issue
我正在嘗試導入
https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0
進入谷歌表並清理它,使其分為三列,一列用於player id
,下一個name
和下一個team
。
我已將公式輸入到谷歌表格中,我認為它應該如何工作,但我的語法錯誤,因為我收到錯誤
導入的內容為空。
我沒有針對正確的數據,我不確定如何在這里准確地做到這一點。
我使用的公式是:
=IMPORTXML("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0","//span[@class='html-attribute-value']")
=IMPORTXML("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0","//span[@class='html-attribute-value']")```
=IMPORTXML("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0","//span[@class='html-attribute-value']")```
這是我的 Google 表格: https : //docs.google.com/spreadsheets/d/1W0Bt5z-Tky-tNhG_JtfE4FfjTRgQNRu_eQu2qVhQ-_E/edit?usp=sharing
嘗試:
=ARRAYFORMULA(IFERROR(QUERY({
REGEXEXTRACT(INDEX(IMPORTDATA("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0"),,1), "id=""(.+?)"""),
REGEXEXTRACT(INDEX(IMPORTDATA("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0"),,1), "name=""(.+)")&" "&
REGEXEXTRACT(INDEX(IMPORTDATA("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0"),,2), "(.+?)"""),
REGEXEXTRACT(INDEX(IMPORTDATA("https://www67.myfantasyleague.com/2019/export?TYPE=players&DETAILS=&SINCE=&PLAYERS=&JSON=0"),,2), "team=""(.+?)""")},
"offset 3")))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.