Solved

Unable to open ... Cannot download the information

Posted on 2011-03-16
13
477 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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
 
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

623 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