2

I have a file_name.iqy file which I am trying to open automatically within Excel 2016.

The contents of the file are this:

WEB
1
https://link goes here
Selection=3
Formatting=Rich Text
DisableRedirections=False

I want to add my credentials into this file so I can stop being prompted for them within the script that I am running (I am trying to automate logging into this site and grabbing the data which is downloaded as an .iqy file). Can anyone provide any assistance? Lastly, I have no reason to believe that link in the file is static for each download.

Ive tried this method http://username:password@example.com/ in the url. But it didnt work. Ive also tried using SendKeys from within Excel and the result in VBA is hanging at the part for credential entering.

noc_coder
  • 349
  • 1
  • 15
  • Is the data being pulled from the IQY file on a website you login to? If so, perhaps write a script to login to the site first? – Ryan Wildry Nov 28 '16 at 22:34
  • @RyanWildry I have a script that logs into the site and downloads the file. But when I try to open the file in Excel, I have to login again even with the browser window still open. – noc_coder Nov 28 '16 at 22:43
  • Not sure, that's what I'd do. What are you trying to get off the site? Perhaps you can just scrape it? – Ryan Wildry Nov 28 '16 at 22:47
  • @RyanWildry The site has the data presented on it. But its not easy to parse via the DOM. I manipulate the site's link and download the IQY file directly and from there I am trying to open it in Excel. I still have to login to the site to download the IQY file. What do you mean by scrape it? – noc_coder Nov 28 '16 at 22:53
  • Can you post the HTML you are trying to parse? – Ryan Wildry Nov 28 '16 at 22:55
  • Is it possible to inbox you? I do not see that feature. I dont feel comfortable openly posting the code. And Im leaving work. But ill be on later. – noc_coder Nov 28 '16 at 23:02
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/129291/discussion-between-ryan-wildry-and-noc-coder). – Ryan Wildry Nov 28 '16 at 23:09

0 Answers0