Solved

Try to import website html table into excel

Posted on 2013-01-28
7
583 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

733 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