Solved

Unable to open ... Cannot download the information

Posted on 2011-03-16
13
471 Views
Last Modified: 2012-06-27
I am trying to add a web querry for http://www.etfsecurities.com/en/etfscalculations/etfspricing_f3.aspx and it seems to come up fine in the "NEW Web Querry" box and I select the table I want, but then get the above error when I try and import.  Cannot figure out why that would be.

Web-Querry-Box.jpg
error.jpg
0
Comment
Question by:mllmar039
  • 8
  • 4
13 Comments
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 35146997
The problem is not with your excel but with the website.
The builder made sure you can't use webquerry in this website to subtract info to excel...

Sorry that I can't help out but it seems to be impossible...


Kind regards

Eric
0
 
LVL 26

Expert Comment

by:redmondb
ID: 35147292
mllmar039,

I agree with Zwiekhorst that the site is blocking (whether accidentally by design).

Assuming that you can't get the site changed, there is a workaround.  Click on the button in the attached file to download the whole page (to C:\Temp\Multiplier.html" - change as required). A web query is then run against that file to give you your data.

(The idea was lifted from http://forums.whirlpool.net.au/archive/1511427.)

Regards,
Brian.


Get-Multiplier.xlsm
0
 

Author Comment

by:mllmar039
ID: 35147409
Hi redmondb,
Have attached the html file that is created, and hinestly it is outside my understanding.  I have tried it on an XP machine and a Vista machine with the same result. Any ideas?
Multiplier.html
0
 
LVL 26

Expert Comment

by:redmondb
ID: 35147481
mllmar039,

Sorry about that. I'm running Excel 2010 on Windows 7. I'll try it on an older version on XP.

In the meantime, assuming that you changed the location of Multiplier.html, could you post a copy of exactly what you ran, please?

Thanks,
Brian.
0
 
LVL 26

Expert Comment

by:redmondb
ID: 35148348
mllmar039,

... and which version of Excel are you running?

Regards,
Brian.
0
 

Author Comment

by:mllmar039
ID: 35148582
Running excel 2007 and left the path and code unchanged on the XP machine and changed the path to the c:/user/.../desktop/ for the permision restrictions on the vista machine. Let me know if you need anything more specific can paste the exact code
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 26

Expert Comment

by:redmondb
ID: 35148610
mllmar039,

Was your path a typo or did you really use "/"?   :)

Maybe best if you post the file!

Thanks,
Brian.
0
 
LVL 26

Expert Comment

by:redmondb
ID: 35148648
mllmar039,

I think that's it. I changed mine to "C:/Temp/Multiplier.html" and got your error.

So, just change the path "/" to "\" (leave the url alone).

Regards,
Brian.
0
 
LVL 26

Expert Comment

by:redmondb
ID: 35149259
mllmar039,

OK, it's not quite that simple. My fault - I should have told you to update the Connection with the new file name and location.

I'm updating the file to make it easy for you to change any of the details.

Regards,
Brian.
0
 

Author Comment

by:mllmar039
ID: 35149598
I dont think it is the "/" "\" problem, I thought it may have been a package for a function call that I do not have as default.  I have found a workaround from a different site that was not exactly what I wanted, but with you code, just needed to modify in a small way.  

'Written: October 29, 2009
'Author:  Leith Ross
'Summary: Returns the contents of a web page as a string.
Function GetSourcePage(ByVal URL As String) As String
    Dim IEapp As Object
    Set IEapp = CreateObject("InternetExplorer.Application")
   
    IEapp.Navigate URL
   
    While IEapp.Busy
        DoEvents
    Wend
     
    GetSourcePage = IEapp.Document.DocumentElement.outerHTML
     
    IEapp.Quit
    Set IEapp = Nothing
End Function


Then your part


Sub getData()
    Dim fso: Set fso = CreateObject("scripting.filesystemobject")
    Dim newfile: Set newfile = fso.createtextfile("C:\Temp\Multiplier.html", True)
   
    newfile.write (GetSourcePage("http://www.etfsecurities.com/en/etfscalculations/etfspricing_f3.aspx"))
    newfile.Close
End Sub

and seems to solve all issues

0
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 35149964
mllmar039,

Great! Glad you were able to sort it out yourself.

I don't think you have to worry about a missing function, though you do have to remember  (unlike me!) to make sure that the Connection is pointing to the new location.

All the best,
Brian.
0
 
LVL 26

Expert Comment

by:redmondb
ID: 35151063
Hey, thanks mllmar039, that was generous of you!
0
 

Author Comment

by:mllmar039
ID: 35151094
Works fine on my home PC so does work 100%, something is missing on my work PCs. Appreciate the help Brian
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now