Import HTML Page based on Cell Value

Lady Phoenix

Registered User.
Local time
Today, 10:26
Joined
Jan 19, 2015
Messages
10
I want to import an HTML page into an Excel sheet based on a cell value

The site Im looking into importing has a make up that part of the url is the id number of the infomation I wish to gather

So, for example the info for id number 12345 is

www(dot)webiteaddress.co.uk/12345

What Id like to do is create a cell "A1" where you type the id number in and the imported data changes to the correct reference

so I want to import

www(dot)webiteaddress.co.uk/"A1"

so if I change the cell A1 to 54321 the imported data becomes the contents of

www(dot)webiteaddress.co.uk/54321

Ive created a connection no problem using the connection manager and it imports fine, but I have to type the entire url in full

Does anyone know how I can conquer this. Ive done it in google sheets and I know excel is a lot better
 
Can't help with HTML.
But, you mentioned that it can work with Google Sheets.
Was looking at a project that didn't get off the water (for boat maintenance).
We were exploring Google docs ability to move data into Excel compatible format.

Also, by chance does your sites provide any XML?
You can search my user name and XML, last year I posted some basic how-to XML to DB sites. XML would be the prefered way to work with a Databaes if that is an option.

Sorry I can't be of more help.
 
I'm good with web dev. But I have no clue what you're wanting to do after you have the URL / cell value together.

Maybe you can explain, in simple, your complete process step by step.
 
OK, this is hard for to explain any more simply as I cant post URL`s due to the 10 post rule

Lets suppose you have a cell where you enter an ID number. Lets call this cell A1

So, the spreadsheet imports from a URL

www{dot}websiteaddress.com/{contents of cell A1}

So, if a user enters a new value into cell A1 the imported data automatically changes

The post above looks great but not ideal for 2 reasons

1 - The data I want to import doesnt match that criteria
2 - Im after an automated system. Its difficult to expect people to follow a list of intructions everytime they want to alter the data. In my exprience if they have to press more than one button they get bored and give up

This is what Im ACTUALLY trying to import

www{dot}virtualmanager.com/leagues/33/3/3

Its the last part of the URL thats important

The 33 refers to a country code, in this instance, Portugal
The next number is the division
The last number is the group

In another imported page Im able to extract the country, division and group so that as the data changes (Perhaps they get relegated or promoted, or change country) the data extracted changes and therefore so should the imported league table

So the imported page needs to be

=CONCATENATE("www{dot}virtualmanager.com/leagues/",Sheet1!A1,"/",Sheet1!B1,"/",Sheet1!C1) (Where sheet1 contains the extracted data
 
Last edited:
Can't help with HTML.
But, you mentioned that it can work with Google Sheets.
Was looking at a project that didn't get off the water (for boat maintenance).
We were exploring Google docs ability to move data into Excel compatible format.

Also, by chance does your sites provide any XML?
You can search my user name and XML, last year I posted some basic how-to XML to DB sites. XML would be the prefered way to work with a Databaes if that is an option.

Sorry I can't be of more help.

Gona be honest, Im a newbie with Office programs. Im a whizz with Excel in so far as I can build massive complex calculations to do various things, but basically I can only use fuctions and formatting.

With regards to Access, Im a complete Novice. Ive used Lotus Approach since 1996 and there isnt much I dont know about it. However, this month I bought a new laptop and cant get a copy that will work on win 8.

Ive been using Google spreadsheets for a while as I like the simple way it imports .json files. Can not figure out how to do it. I posted a request on another thread and some knd person posted loads of line of code, which I have no idea what to do with.

Anyway, to answer your first paragraph I solved it as follows

In cell A1 you invite the user to enter an ID number
Then (hidden) in cell B1 you entered the formula =CONCATENATE({beginning of url},A1)

Then in another cell it went something like =IMPORTJSON(B1)

There was some coding involved but the web page I found it on explained it in a fashion that assumed you were not Sheldon Cooper.

Its ok saying "Here is the code" but if the user doesnt know what to do with it, you may as well not bother.

Alas, it looks like Ive spent all this money on the office package when so far Ive achieved less than I had on a web based free website :(
 

Users who are viewing this thread

Back
Top Bottom