You'll need to open a text editor and create an IQY (Internet Query) file as a plain text file to use as the basis for your data import.
The IQY file should have four lines: This is where you can work a couple of tricks. In this example, we just need a single parameter—the stock symbol.
The Web query parameters let you use set values, get the values from a worksheet range, prompt the user for input, or set values programmatically via VBA macros.
One workaround is to create your query as outlined above and then run a VBA macro to dynamically change the Connection property of the query to provide the correct URL for Web pages that use the GET data.
For Web pages that use POST data, this is not a solution.
Those scenarios will require a little bit of manual labor.
Unfortunately, working with parameters is not as straightforward as it could be.
To access Web query properties, right-click on a cell in the query results and choose Edit Query.Another advantage is that the URL contains the stock symbol (GOOG, in this case), so it will be easy to manipulate via a VBA macro, and it has little confusing information in it.Finally, this Web query doesn't put important information in images or through links.You'll probably want to change the Data Range's name from the default to a name you can easily access through a macro.In this example, we'll rename the Data Range to Stock Prices.