In this post, I'll show you how to query data from a website using Microsoft Excel. In this example, we will be extracting the stock quote and relevant information for Macy (NYSE:M) from the Yahoo! finance page. First, launch Excel. From the Data taskbar, select Import -> External Data -> New Web Query.
The web query will open a window. In the address section (look for the first red circle), type in the web address. Here I typed in "http://finance.yahoo.com/q?s=M", which is the address for looking up the stock quote for Macy's in Yahoo! finance. Click on Import (the second red circle).
Excel will give you the option to output the data in the existing spreadsheet or a new spreadsheet. Make your choice and click on OK.
Now you should have the data in your Excel spreadsheet. You can analyze the data as you wish.
You can save this entire process in a macro, and launch it with the press of a button. Depending on how you design your macro, you can kick off the process everyday and get the most current information.
You can even have SAS kick off this macro, and read in the data from the Excel spreadsheet. Using this method, you can write a SAS program - maybe to analyze a particular stock - which can pull data from a finance website for that stock. Please see my post on August 27, 2008 (Tools of the Trade V: Kicking Excel VBA Macros From SAS) on how to launch Excel macros from SAS, and see my post on December 29, 2007 (Tools of the Trade II: Using SAS to Extract the Data) on how to read in data from Excel into your SAS program.
Subscribe to:
Post Comments (Atom)
1 comment:
http://everyoneweb.be/spymobile1985a184/#cell_phone_tracking_gps cell phone text message monitoring reviews [url=http://everyoneweb.be/spymobile1985a299/#how_to_track_down_stolen_iphone_4]spy kids movie 2011 cast[/url] gps tracking app for cell phone phone spyware software free spy software for mobile phones nokia http://everyoneweb.be/spymobile1981a227/#mobile_phone_bugging_today_tonight himym season 8 episode 2 online stream [url=http://everyoneweb.com/spymobile1972a274/#someone_is_spying_on_my_iphone]spy tron sunglasses replacement lenses[/url] cell phone counter surveillance techniques how to spy on cell phone free text spy app blackberry http://everyoneweb.com/spymobile1989a274/#download_mobile_spyware_free how to spy on a cell phone without installing software free [url=http://surveys.questionpro.com/a/TakeSurvey?id=3400465#nice_phone_monitoring_system]can i read my kids text messages online at&t[/url] text message spy free download gps tracking cell phone number canada cellcontrol and remote install cell phone spy software
http://everyoneweb.com/spymobile1975a27/#cell_spy_arsenal_freeware [url=http://everyoneweb.be/spymobile1981a177/#watch_himym_online_season_8]how to locate a cell phone number[/url]
#spybubble_installation_guide
Post a Comment