Pulling avg w/kg into Excel or Google Sheets


Wondering if anyone has found a way to pull a riders avg w/kg from Zwiftpower into an Excel or Google sheets? I am captain of a team and did something manually last year to track peoples improvements over the season.

I’ve tried this in google sheets, but I get an error

Error Imported content is empty.

> =IMPORTHTML("http://www.zwiftpower.com/profile.php?z=2240", "table", 1)

Hoping someone smarter than me has already resolved it!



Hi Greg.
I was wondering the same as you.
I tried using the function “=IMPORTXML()” and tried to compile the “query_xpath” variable. I took the values from “XPath” or “full XPath” as highlighted in this image:


but received a “#N/D” output.
Unluckly my programming knowledge aren’t so advanced and I’m searching to find a solution.
In case of any successful updates, I let you know.



I’ve never tried this but googlesheets would be unable to “login” to zwiftpower to access the data, so it is always likely to fail.

Watch you don’t get Zwifts legal department on you for scraping stuff from zwiftpower.

They really need better tools for organisers whether that is inbuilt to ZP or an organiser role to be able to get data from your own events. WTRL have the access it would be good if they expand that to others.


Look for a XHR with URL htxxs://zwiftpower.com/cache3/profile/all.json?= … it will contain the raw JSON data. From there you can process however you want. Easiest may be a quick Node/Python script to convert JSON to CSV and then import that instead.

IMPORTJSON in google sheets supports curl commands (so you support headers including the auth cookie) though it didn’t work for me on a quick test. Remember that your cookie will expire, so no matter you’ll have to update it if you want to refresh data in future.

1 Like