How to do a web query

wut

Banned
Joined
Dec 13, 2010
Messages
229
I don't know where to begin with this, or what the capabilities of a web query are.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You're thirty minutes late with that. It didn't help. I'm seeing a lot of people asking questions about their queries, but nothing that just says "This is how you do a query".

Edit: ...Using VBA.

I don't want to just copy and paste some random person's crap. I want the bare bones.
 
Upvote 0
I'm not 30 minutes late for anything. When I run that exact query in Google, both the second and third sites listed (mrexcel.com and techrepublic.com) show a STEP-BY-STEP guide on how to do a web query. WITH SCREENSHOTS.

http://www.mrexcel.com/tip103.shtml

http://www.techrepublic.com/article/pull-data-into-microsoft-excel-with-web-queries/6115870

If you cannot figure it out from there, how much help are we going to be? If you have a specific question about a query - like why some websites can't be queried using this method because the designer didn't create tables properly - great, ask away.
 
Upvote 0
Edit: All right, I didn't realize the second link was using an earlier version of Excel.

What I don't see there is any code that I'm going to be able to work with to get what I need.

It talks about manipulating the query with VBA, but not actually running the query entirely using VBA.
 
Last edited:
Upvote 0
I didn't realize the first was talking about the older version of Excel too. As far as I can tell, though, there's still nothing there that's going to help me, because I'm going to need to do this using VBA.

It has to be automated. Is there something that I'm not seeing on those sites that discusses that?

Well, thanks for pointing out the obvious, anyway >_>
 
Last edited:
Upvote 0
See your other post for the "obvious" answer. Record a macro of you performing the steps manually, then read the code it creates.

If there's something you don't understand in the code, or what to change to do something different, ask that question.
 
Upvote 0
When I try to delete existing queries on a page using the following code, "Add"ing a new query with the same name results in a query with a "_#" after it.

How do I get rid of a query completely?

Code:
Sub test()
 
For Each Q in ActiveSheet.QueryTables
   Q.Delete
Next
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,706
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top