Avatar of Codestone
Codestone
 asked on

Excel: Getting data from a dynamic URL

Hi,

I have a pricing spreadsheet which enables you to choose a Month/Year on which to base the pricing (e.g. April 2015/June 2015 etc.).

I have multiple HTML pages on a web server (e.g.  Pricing-Apr15.html, Pricing-June.html).

I want the user to pull down a month (e.g. April/May/June etc.) and then for the pricing sheet to pull the pricing data from the relevent HTML file on the webserver.

I don't see any way to make the Connection String dynamic in the Connection Properties (see screenshot, attached).
excelscreenshot.png
Help!

Thanks :)
Microsoft ExcelMicrosoft OfficeVBA

Avatar of undefined
Last Comment
Codestone

8/22/2022 - Mon
Saurabh Singh Teotia

Quick question if i understand correctly what you are trying to say that in your web sever the entire link remains constant the only change part is the months..Like in the below example of links...

http://www.moneycontrol.com/india/stockpricequote/banks-public-sector/statebankindia/SBI

http://www.moneycontrol.com/india/stockpricequote/banks-public-sector/bankofbaroda/BOB

The only changing part is after banks-public-sector..rest of the link is constant..let me know is my assumptions correct in this case??

Saurabh...
Qlemo

This usually requires VBA code. The connection string URL does not allow for variable parts.
Codestone

ASKER
Hi Saurabh, yes your assumption is correct
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Codestone

ASKER
Perfect - thanks :)