6 Responses

  1. JP
    JP at |

    Hey,
    I tried to do this with Excel 2007 and I could not choose a different worksheet. Is there a way you did that or am I just using too old of a version?

  2. Tanner Bell
    Tanner Bell at |

    Hi JP. Good question. I no longer have access to Excel 2007. It sounds like you’re talking about the part where the data is pulled into the sheet, starting at around the 9:18 mark. What if you create a new sheet before this, and then select the cell you want the information to populate in before you click the “Existing Connections” button? My guess is the information would pull into this new tab at that point.

  3. Sean
    Sean at |

    Hi Tanner,

    I’m having some difficult with running a query from tables from Fangraphs. Maybe you can help with the coding aspect.

    I’m basically trying to capture gamelogs of my team’s players throughout the season. I want to be able to pull each players fangraphs “standard” gamelog (not advanced, dashboard, etc.).

    I have followed your instructions, using the above video as a base. However, when I get to editing the query in Notepad, the web address for Dustin Pedroia, for example is this:
    http://www.fangraphs.com/statsd.aspx?playerid=8370&position=2B&type=1&gds=&gde=&season=2014

    How can I edit the web query to read the playerid, position, and (I think) type of format of the game log (i.e. standard view vs. dashboard (type=0))? This may be unclear but happy to clarify or if you know of a better way to pull down daily game logs of players, I would be greatly appreciated.

    Also, is there any reason that Baseball Reference doesn’t allow you to pull their web tables in anymore? Just curious. I could do it for about 2/3 of last season

  4. Tanner Bell
    Tanner Bell at |

    Hi Sean,

    In regards to your Baseball Reference question, the tables on some sites don’t seem to get identified in Excel, so you don’t see the neat little yellow arrow. But in the iqy file, the “Selection=” option might still allow you to pull in the information. I believe “Selection=2” would pull in the second table on the page. And this is what let me pull in a game log from a player’s game log page.

    For example, to pull in Miguel Cabrera’s 2014 game log my iqy file looked like this:

    WEB
    1
    http://www.baseball-reference.com/players/gl.cgi?id=cabremi01&t=b&year=2014

    Selection=2
    Formatting=None
    PreFormattedTextToColumns=True
    ConsecutiveDelimitersAsOne=True
    SingleBlockTextImport=False
    DisableDateRecognition=False
    DisableRedirections=False

    I just keep changing “Selection=” to different numbers until the information I want comes in.

    Hope that helps,

    Tanner

    1. Sean
      Sean at |

      Tanner, Thanks for the quick response and apologies on my delayed response. For some reason BR isn’t working even when toggling the “Selection=” to any given number. The Fangraphs does work for me even with the added nuisance of adding type and position. It’s further complicated by players with multiple position eligibility. But I do appreciate the help and it’s working well for me now.

      What I’m basically trying to do is capture each team’s daily performances (mine in particular) but I haven’t found a good way to automate that process yet completely due to start/sits on any given day.

Comments are closed.