+ Reply to Thread
Results 1 to 9 of 9

Edit Web Query - get data from web

  1. #1
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Edit Web Query - get data from web

    i have a worksheet that gets data from web - its automated, but the website goes through a tunnel - with security - requires username and password

    the Query Runs ok and smooth but i have to login manually by right clicking on a table where the query is and selecting "Edit Query" so i can login, excel vba doesnt save passwords for that part...

    one way i find it possible to automate that part too would be to use maybe like the sendkeys statement to pop up the context menu from right clicking the mouse button, or like the options button on the keyboard, but i'm not finding anyone successful with that in the web...

    i found this one:
    Please Login or Register  to view this content.
    it works but the context menu comes exactly from where the current mouse position is..
    i needed it to do the right click on a specific range in the worksheet (where the web query is)


    any better suggestions?
    don't worry, there's a lot of people that are far more confused than you
    but if you liked what i suggested. Click for me the "Add Reputation" - that way, we'd be both happy.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Edit Web Query - get data from web

    This lengthy thread may help if you're willing to read through it.

    Automating a web query login
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: Edit Web Query - get data from web

    oh thank you.. i'll definitely check that out

  4. #4
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: Edit Web Query - get data from web

    i checked out the posts on that page, they dont seem to show the replies.. do i need to log in or something in there?
    oh nm... i got it.. ok reading through

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Edit Web Query - get data from web

    Hello ag273n,

    You can automate logging in by using Internet Explorer which can be launched and controlled by VBA. This may be a better option. You would need to post the URL you want to access without the password and user name.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Edit Web Query - get data from web

    Hello ag273n,

    You can automate logging in by using Internet Explorer which can be launched and controlled by VBA. This may be a better option. You would need to post the URL you want to access without the password and user name.

  7. #7
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: Edit Web Query - get data from web

    @ Leith, thanks, i've tried that option too. but i think it's not as effective.. i observed that the connections existing inside an excel web query is separate from an actual log in done through a web browser launched separately.
    while doing this web query file, i currently am logged into (through Internet Explorer) the same website where i get the data from, surprisingly, when i go run to refresh the data, it required me to enter my credentials - so that duplicated my instance of being logged in - one in the IE, and another one in excel.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Edit Web Query - get data from web

    Hello ag273n,

    I really don't have enough information about what you are doing to guide you further. I can tell you using the API is not the way to go and SendKeys is not reliable for controlling another application.

  9. #9
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: Edit Web Query - get data from web

    i cant provide the actual Link, i might get fired if i do... but for the mean time,

    can we try this:
    http://www.bentekenergy.com/Login.aspx

    i found that link in aphafrogs URL, somebody posted for it... Similarly, i have the same problem as the poster in there so making it work for that one should help me figure out a way for mine too... i really appreciate your help Leith and Alphafrog

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to do Edit Query from Import External Data.
    By Excel General Questions in forum Excel General
    Replies: 2
    Last Post: 04-13-2009, 08:33 PM
  2. [SOLVED] why does edit query button not open query
    By needlemaker in forum Excel General
    Replies: 0
    Last Post: 06-29-2006, 10:20 AM
  3. Excel new/edit External Data Query hangs
    By Melissa in forum Excel General
    Replies: 0
    Last Post: 04-19-2006, 02:45 PM
  4. [SOLVED] MS Query-ability to edit select query
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2005, 09:06 AM
  5. Edit Query from Excel will not open query in MSQuery
    By Michelle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-21-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1