A macro to Download form data from webpage (Just learning about Excel at 61)

HectorIN2Excell

New Member
Joined
May 7, 2023
Messages
8
Office Version
  1. 2007
Platform
  1. Windows
I am trying to download webpage data from the link below and can do it to a certain standard but the data gets jumbled at times and isn't consistent
using procedures within excel.
Greyhound Bet | Greyhound Betting Web App from the Racing Post

So I would like to have my own macro that collects data from each race for 6 greyhounds.
with the data from each heading below in a table.

DateTrackDisTrpSplitBendsFinByWin/SecRemarksWnTmGngWghtSPGradeCalTm

The end product I would appreciate is to have the : The greyhound name, The data under each heading, Each race downloaded onto separate sheets, Race 1 on sheet1 upto last Race 12 on sheet 12. This is repeated for which ever greyhound track meeting I run at it on. (Tracks are like Romford, Crayford, Towcester, etc)
I am a oldie whois a newbie at this so I would really appreciate some of your wisdom and knowhow on this matter.

Thanks in advance
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Nicely done identifying the JSON source!
Well, it's a little trick here. From any Chromium-based web browser, you can press F12 to open Developer Tools, then click the Network tab to figure out what API endpoint is providing data feed to the website you're visiting.
1684374800199.png
 
Upvote 1
Well, it's a little trick here. From any Chromium-based web browser, you can press F12 to open Developer Tools, then click the Network tab to figure out what API endpoint is providing data feed to the website you're visiting.
View attachment 91834
😉 I'm familiar with it, but it's not a little trick - it's one I wish more people knew, and so am grateful to you for explaining it here on the forum!
 
Upvote 0
Hi Hector

Did you get this worked out from the help?

If not, i have some code for you.

Dave
 
Upvote 0
Hi Hector

Did you get this worked out from the help?

If not, i have some code for you.

Dave
I'm sorry but talking JSON and all is above my scope. I am manually doing at the moment......so any code would be appreciated. I think you guys are all amazing but you have to be aware that some of us are really starting to learn this from scratch...Real Dummies do exist to .....to start with.
 
Upvote 0
I'm sorry but talking JSON and all is above my scope. I am manually doing at the moment......so any code would be appreciated. I think you guys are all amazing but you have to be aware that some of us are really starting to learn this from scratch...Real Dummies do exist to .....to start with.
I don't understand. What are you talking about? @nguyendang already wrote the whole thing for you: A macro to Download form data from webpage (Just learning about Excel at 61)
 
Upvote 0
Dan

i think the issue is its not setting out the data as per the original post.

Hector

Can i just confirm what you want.

1 - We would add a drop down(data validation) list say into cell a1. This would be all the track names from todays racing
2 - You could then use this to select the track you want to download.
3 - after selection of your track, we would work out how many races are at that track. Then create sheets to this amount, 14 races would be sheets 1-14 created.
4 - then on sheets 1-14, starting at sheet1 we would download the 1st race, all the information from all 6 greyhounds as per the header catagories you requested in your original post.

is that something like correct.
I would imagine you want to run some sort of data analasis on this data.
could i ask why you would not review 1 race at a time, so the dropdown would be everyrace from today, and on selextion 1 comple race would be downloaded?

Dave
 
Upvote 0
hector

i have just sent you a privat message
 
Upvote 1
Solution
Dave I need to give you a standing Ovation......You gave me the perfect solution. All I can say is thank you!!
 
Upvote 0
Dave I need to give you a standing Ovation......You gave me the perfect solution. All I can say is thank you!!
Thanks for the feedback hector.

thanks need to also go out to @nguyendang for suggesting and writing the part to get the json, as i have never seen this before.

good job

dave
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top