Solved

Try to import website html table into excel

Posted on 2013-01-28
7
580 Views
Last Modified: 2013-01-30
Hello Everybody

I've tried to do some kind of automatic import of these two webistes with Excel 2007
(Tab Data and From Web):

http://www.cmegroup.com/trading/energy/crude-oil/light-sweet-crude_quotes_settlements_futures.html

https://www.theice.com/marketdata/reports/ReportCenter.shtml#report/5

Are there spezial Tools or Makros because Excel is not able to identify the tables as table.
0
Comment
Question by:HelpdeskJBC
7 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38826894
It worked for me.  Did you select the table in the browser?  I just used chrome, selected the area and pasted to excel.
wb1.xls
0
 

Expert Comment

by:c_card
ID: 38827363
An example where you can see whats going on:
1.  Create a page that loads the  page with the table you want in it. Just use an IFrame.
2.  Create a button "Excel Export".
3. Use jQuery to construct a get that fires from the button that retrieves the html of the table element.
The GET needs ContentType:"application/vnd.ms-excel" ad add a header that has value "Content-Disposition","attachment;filename="+ sExportFilename +".xls"

This will let you download the table as an excel spreadsheet.
0
 

Author Comment

by:HelpdeskJBC
ID: 38830018
Hy there in the excel sheet was no connection so just fyi i need a data link to the source which i can update by clicking refresh...

I already tried to create an excel export but excel is not able to get the table so i can only mark the hole side for import and this is stupid.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 5

Expert Comment

by:KyleSW
ID: 38831232
The problem is that neither of those sites actually have tables in the source data, the first pulls the data in from another location, so that's actually straightforward. The second is a little more tricky since the tables are built dynamically on load in javascript. Try this link for the first table, note you can change the date in the url to change the data:

http://www.cmegroup.com/CmeWS/mvc/xsltTransformer.do?xlstDoc=/XSLT/da/DailySettlement.xsl&url=/da/DailySettlement/V1/DSReport/ProductCode/CL/FOI/FUT/EXCHANGE/XNYM/Underlying/CL?tradeDate=01/28/2013

I'll have a look at the second one when I get chance
0
 

Author Comment

by:HelpdeskJBC
ID: 38834426
Great work!
How did you manage to come to this link?
0
 
LVL 5

Accepted Solution

by:
KyleSW earned 500 total points
ID: 38834708
I use Chrome since it makes things easy, hit F12 to open developer tools and load the page.

On the Network Tab are all the pages requested by the web page when it loads. If you click on them you get extra info for each line, which opens on a tab to the right. The top part of the first tab that opens details the request page (the url), the response can be seen on the response tab - this was easy to spot since all it really returns is a table.
0
 

Author Closing Comment

by:HelpdeskJBC
ID: 38835388
thats a great info
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question