1. #1
    JKC691
    JKC691's Avatar Become A Pro!
    Join Date: 01-23-14
    Posts: 2
    Betpoints: 24

    Can you copy a webpage into excel using a macro?

    Hi guys

    i use statfox stats for some systems i use. The results are good. I am tired of cutting and pasting every game stats into excel. Is there a macro i can use or better way to do it. On saturday it can take a long long time for hoops.

    Any help would be greatly appreciated

  2. #2
    Miz
    Miz's Avatar Become A Pro!
    Join Date: 08-30-09
    Posts: 695
    Betpoints: 3162

    you should look into scraping.

  3. #3
    a4u2fear
    TEASE IT
    a4u2fear's Avatar SBR PRO
    Join Date: 01-29-10
    Posts: 8,147
    Betpoints: 35459

    Yes definitely. You need to use VBA to import a web page, then use code to go through multiple days and pull them in. I once started a thread on how to do this in VBA/Excel but I've had a few too many brews to find it right now.

    Whats good about excel and VBA is you can click record macro, do what you want, then stop it and read what the code needed was to perform the action

  4. #4
    a4u2fear
    TEASE IT
    a4u2fear's Avatar SBR PRO
    Join Date: 01-29-10
    Posts: 8,147
    Betpoints: 35459

    Read this if you can follow you will succeed

    http://www.sportsbookreview.com/forum/hockey-bet...-odds-sbr.html

  5. #5
    Miz
    Miz's Avatar Become A Pro!
    Join Date: 08-30-09
    Posts: 695
    Betpoints: 3162

    what sport is it? way faster to buy a subscription... gamblindbs dot com is a good one

  6. #6
    James Marques
    James Marques's Avatar Become A Pro!
    Join Date: 03-04-14
    Posts: 1,605
    Betpoints: 3692

    Hi, long-time lurker, first-time poster. Excel is a great tool for web scraping on its own (with the import data function), but even better if you learn to use Python. I haven't used Excel as much in the last couple of years (I'm using OpenOffice Calc now), but it is very user-friendly. The help files can walk you through recording macros to scrape whatever info you need. Some sites (a lot of ratings sites like Dunkel or even somewhat with Sagarin) can be a b**ch but there's always a way around it. I do mostly college football, and cfbstats.com will go as far as to give up .csv files you can easily convert into Excel files with a couple of clicks. They go back all the way to 2003 I think.

  7. #7
    nash13
    nash13's Avatar Become A Pro!
    Join Date: 01-21-14
    Posts: 1,122
    Betpoints: 7160

    I'd like to scrape three websites (Dunkel Index, DCI and Massey Ratings) , but I don't have the knowledge nor the tools to do so. Maybe should start with Python or something simillar.

  8. #8
    a4u2fear
    TEASE IT
    a4u2fear's Avatar SBR PRO
    Join Date: 01-29-10
    Posts: 8,147
    Betpoints: 35459

    I could start a day to day tutorial of excel scrapping if people want. VBA is so easy to use and I have successfully scraped data for nhl and nfl for 5-7 years off the web

  9. #9
    nash13
    nash13's Avatar Become A Pro!
    Join Date: 01-21-14
    Posts: 1,122
    Betpoints: 7160

    this would be awesome. i would really like to contribute some strategies based on scrapping data from several websites. i have backtested data from covers.com and various rating sites, but never had the skill to combine them.

  10. #10
    oddsfellow
    oddsfellow's Avatar Become A Pro!
    Join Date: 02-20-11
    Posts: 18
    Betpoints: 11752

    Would be very interested in this if at all possible

  11. #11
    antonyp22
    antonyp22's Avatar Become A Pro!
    Join Date: 01-12-14
    Posts: 78
    Betpoints: 2528

    Count me in for the tutorial

  12. #12
    a4u2fear
    TEASE IT
    a4u2fear's Avatar SBR PRO
    Join Date: 01-29-10
    Posts: 8,147
    Betpoints: 35459

    Nash, that Massey website is a php/HTML and the data is embedded in tables that not anyone can access, so scraping that page is not doable from my knowledge.

    if anyone else wants to see scraping using excel VBA on another website just say so

  13. #13
    nash13
    nash13's Avatar Become A Pro!
    Join Date: 01-21-14
    Posts: 1,122
    Betpoints: 7160

    thanks for the response. i really think that python is the way to go from here. thanks for the effort. but anything else could be useful too.

  14. #14
    solring
    solring's Avatar Become A Pro!
    Join Date: 11-04-09
    Posts: 169
    Betpoints: 3434

    Quote Originally Posted by a4u2fear View Post
    I could start a day to day tutorial of excel scrapping if people want. VBA is so easy to use and I have successfully scraped data for nhl and nfl for 5-7 years off the web
    The sticky might be a good place to put this...

  15. #15
    redking
    redking's Avatar Become A Pro!
    Join Date: 08-25-10
    Posts: 62
    Betpoints: 2734

    Quote Originally Posted by a4u2fear View Post
    I could start a day to day tutorial of excel scrapping if people want. VBA is so easy to use and I have successfully scraped data for nhl and nfl for 5-7 years off the web
    I don't know if you're still doing this but I would be interested in a tutorial.

  16. #16
    Professor1215
    Improve Everyday
    Professor1215's Avatar Become A Pro!
    Join Date: 11-28-11
    Posts: 216
    Betpoints: 3212

    I am looking to get data from www.fangraphs.com. OP, can you PM me? Would love to work with you.

Top