Can you copy a webpage into excel using a macro?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JKC691
    SBR Rookie
    • 01-23-14
    • 2

    #1
    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
  • Miz
    SBR Wise Guy
    • 08-30-09
    • 695

    #2
    you should look into scraping.
    Comment
    • a4u2fear
      SBR Hall of Famer
      • 01-29-10
      • 8147

      #3
      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
      Comment
      • a4u2fear
        SBR Hall of Famer
        • 01-29-10
        • 8147

        #4
        Read this if you can follow you will succeed

        Sports betting and handicapping forum: discuss picks, odds, and predictions for upcoming games and results on latest bets.
        Comment
        • Miz
          SBR Wise Guy
          • 08-30-09
          • 695

          #5
          what sport is it? way faster to buy a subscription... gamblindbs dot com is a good one
          Comment
          • James Marques
            SBR MVP
            • 03-04-14
            • 1605

            #6
            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.
            Comment
            • nash13
              SBR MVP
              • 01-21-14
              • 1122

              #7
              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.
              Comment
              • a4u2fear
                SBR Hall of Famer
                • 01-29-10
                • 8147

                #8
                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
                Comment
                • nash13
                  SBR MVP
                  • 01-21-14
                  • 1122

                  #9
                  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.
                  Comment
                  • oddsfellow
                    SBR Rookie
                    • 02-20-11
                    • 18

                    #10
                    Would be very interested in this if at all possible
                    Comment
                    • antonyp22
                      SBR Hustler
                      • 01-12-14
                      • 78

                      #11
                      Count me in for the tutorial
                      Comment
                      • a4u2fear
                        SBR Hall of Famer
                        • 01-29-10
                        • 8147

                        #12
                        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
                        Comment
                        • nash13
                          SBR MVP
                          • 01-21-14
                          • 1122

                          #13
                          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.
                          Comment
                          • solring
                            SBR High Roller
                            • 11-04-09
                            • 171

                            #14
                            Originally posted by a4u2fear
                            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...
                            Comment
                            • redking
                              SBR Hustler
                              • 08-25-10
                              • 62

                              #15
                              Originally posted by a4u2fear
                              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.
                              Comment
                              • Professor1215
                                SBR High Roller
                                • 11-28-11
                                • 216

                                #16
                                I am looking to get data from www.fangraphs.com. OP, can you PM me? Would love to work with you.
                                Comment
                                SBR Contests
                                Collapse
                                Top-Rated US Sportsbooks
                                Collapse
                                Working...