Import external data from a complex web site into Excel
Microsoft Excel is not only used as an holding simple values but as an powerful tool used for analyzing data.Data in the chart, we can apply filters,create chart, sort according to the datas,grouping the datas, create pivot tables and much more. Excel Also have some options to directly import webpage dynamic contents to the sheet.
Web scraping using Add-ons:
Add-In presents in the Excel will improves an built-in functionality for importing live data from web pages.The Excel automatically imports one or multiple tables under user selection.
Goto Data->From Web Option presents at the upper ribbon area.
Once you clicked From Web option, you will get the dialog box converges which get url as inputs and produces output as a webpage. It allows user to select the area to be get the data. Either user can select individual value or total table by selecting left top corner import icon.
Web scraping using XPath:
XPath is a XML query language that can be used to locate a specific part of an XML document in the webpage.A web scrapers generally parse an HTML documents into an XML documents and use XPath(XML Path) to query.
A Example for XPath looks like /html/body/div/div/h5/span
It can be easily obtained by using, Firebug add-on from the Firefox browser.
Quick tip:
Incase you no need live datas, directly copy from the table on the webpage and copy it to the Excel sheet.It works..!!
No comments:
Post a Comment