1. Data > Import External Data > New Web Query 2. Copy/Paste the address into the address bar. 3. Select the table you want to import. 4. ???? 5. Profit!
This is Excel not underpants gnomes
The philosophy is all-encompassing.
Tav is right. I use it at work all the time.
1. Data > Import External Data > New Web Query 2. ????? 3. Paycheck!
thedude wrote:You can also just cut and paste and click "text to colums" under data.
This is the method I use all the time. It is not perfect - but with a little tweaking - it gets the job done.
A lot of times with baseball stats it separates the first and last names into two different columns and you have to make a new column and use a formula like ("=A1&" "&B1) to combine the names into one column.
Web query is definitely the way to go, especially if you want to keep updating as the season progresses. I do this to track a non-roto fantasy league that I have been a part of for years - I just set up the spreadsheet last year and the web query works like a charm (albeit slowly since I grab so much data). Any questions about it, let me know ...
My biggest difficulty is that I would like to grab more than the top 50 in any given category (as shown by your links) with one query. I figured out how to do this at foxsports.com, but I think mlb.com is a more reliable source of stats. Does anyone know how to display an mlb.com stats page with more than the top 50 at a time?
So if you grab data from a website using a web query, are you saying it updates when you reopen that sheet? Or that it's easier to update when new data comes online? I'm not familiar with web queries, so any info would be great.
You can set up a worksheet in newer versions of Excel to automatically update the web query when the sheet is opened. I don't have this option set - I just go to Data -> Refresh Data and the query is then reset to the latest info on the website.
knapplc wrote:So, Steve-O, did the web query work?
Yup. I was using it to look at the .200 slugging and k/bb thing for ST stats. I'll share my results here (instead of the leftovers) since y'all were so helpfull. BTW, my draft was tonight.
Player Increase N Swisher 0.375 I Rodriguez 0.367 P Polanco 0.344 C Guillen 0.292 B Anderson 0.288 F Pie 0.274 R Furcal 0.272 C Guzman 0.265 R Howard 0.257 S Pearce 0.224 L Milledge 0.211
Pitchers (not very useful because of limited sample size)
Player % Increase C Zambrano 421% M Parra 369% R Oswalt 357% T Buchholz 352% B Webb 335% B Carlyle 332% J Litsch 324% F Hernandez 293% R Halladay 282% A Lopez 254% J Santana 237% R Nolasco 227% J Towers 221% J Weaver 213% H Bell 203% J Contreras 196% J Maine 196%
In my fridge: Founders Kentucky Breakfast Stout (KBS), Central Waters Peruvian Morning, Bell's Batch 10,000, Dale's Pale Ale, Capital Brewery Amber, New Glarus Moon Man, and Guinness.
Steve-o
Major League Manager
Posts: 1879
Joined: 7 May 2004
Bases this season: 0
Home Cafe: Baseball
Location: Finally back home. A sweet 15 mi from Miller Park.
knapplc wrote:So if you grab data from a website using a web query, are you saying it updates when you reopen that sheet? Or that it's easier to update when new data comes online? I'm not familiar with web queries, so any info would be great.
Yeah the web queries will update. You can set the behavior, like if you want it to refresh when you open the workbook or at intervals. They are really nice when you have many pages to scrape data from. If you can determine the URL sequence you can use a macro and a web query to pull a lot of data off a lot of pages in a relatively short period of time.
Maine has a good swing for a pitcher but on anything that moves, he has no chance. And if it's a fastball, it has to be up in the zone. Basically, the pitcher has to hit his bat. - Mike Pelfrey