Back to Boards
Issues Importing into Google Sheets
Issues Importing into Google Sheets
I use Google sheets and have been importing various parts of the site into sheets for years as suggested on the site. In the last couple of weeks it has stopped working and I can't figure out why. Has something on the site changed in the background? Has anyone else experienced this? Does anyone have a workaround?
Re: Issues Importing into Google Sheets
@Brenzini yes due to a flood of overseas bots scraping the website, the Google import has stopped working - because of that I did add an Export CSV link to most tables - if you're not seeing it on a specific table, let me know - and also, let me know if this helps - it should allow you to download the data, and if you want it in Google Sheets it should be a simple upload.
Re: Issues Importing into Google Sheets
i haven't had any issues using google sheets. i use many, many, many formulas to scrape tons of data, but let me provide a couple different formulas i use and see if they differ from what you're using.
this one gets my win/loss record for baseball from my profile.
=IMPORTXML("https://www.pennantchase.com/home/userprofile?useek=luckyguy73",
"//text()[contains(., 'W-L All Time')]/following::text()[1]")
this one gets the win/loss record for one of my teams from the league standings page.
=TRANSPOSE(
ARRAYFORMULA(
SUBSTITUTE(
IMPORTXML(
"https://www.pennantchase.com/league/baseball/standings?" &
REGEXEXTRACT(A2, "?(.*)"),
"//tr[.//a[normalize-space()='" & TRIM(D2) & "']]/td[position() =3 and position() =6 or position() =11 and position() =12]"
),
"-",
UNICHAR(8209)
)
)
)
this one gets my win/loss record for baseball from my profile.
=IMPORTXML("https://www.pennantchase.com/home/userprofile?useek=luckyguy73",
"//text()[contains(., 'W-L All Time')]/following::text()[1]")
this one gets the win/loss record for one of my teams from the league standings page.
=TRANSPOSE(
ARRAYFORMULA(
SUBSTITUTE(
IMPORTXML(
"https://www.pennantchase.com/league/baseball/standings?" &
REGEXEXTRACT(A2, "?(.*)"),
"//tr[.//a[normalize-space()='" & TRIM(D2) & "']]/td[position() =3 and position() =6 or position() =11 and position() =12]"
),
"-",
UNICHAR(8209)
)
)
)
Re: Re: Issues Importing into Google Sh
@luckyguy73 the problem is certain pages have stopped working, the examples you've given don't fall into that category.
Re: Re: Issues Importing into Google Sh
i also use the importhtml formula to get compiled stats from the batting lineup, starting rotation and bullpen tables.
=IMPORTHTML(
INDEX('League Details'!B:B, MATCH(A1, 'League Details'!C:C, 0)),
"table",
SWITCH(A3,
"Batting Lineup", 0,
"Starting Rotation", 3,
"Bullpen", 4,
0
)
)
=IMPORTHTML(
INDEX('League Details'!B:B, MATCH(A1, 'League Details'!C:C, 0)),
"table",
SWITCH(A3,
"Batting Lineup", 0,
"Starting Rotation", 3,
"Bullpen", 4,
0
)
)


