Going through HTML source code

Spurious

Active Member
Joined
Dec 14, 2010
Messages
439
Hello guys,

got a more general question.

I got a HTML source code I want to go through and write certain passages that are within certain <></> brackets. Is instr really my only way of sorting that out, because I run into a few problems.

To be more specific:
It's a source code that has exchange rates and it's divided by month and days, so there is month 1, then 30 days, then month 2 then 30days, rinse and repeat.

I kinda have problems with those months, because he always skips and I havent really found a solution.
 
Big, big thank you !!

I modified it a bit (used output instead of binary access - why did you use that?) because it fitted my purpose better.

Again, thanks !
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Alright, I use print and output for now, because I prefer the newlines for every part.

I got one more question though, how do I need to modify the script so that he takes everything between the two html tags and leaves out the html tags itself.
 
Upvote 0
Spurious

I was going to post an example of what I meant, but I assumed you had a solution, plus the HTML you posted wasn't complete so I couldn't really do anything with it.

Also, I still don't know where you are actually getting this data from in the first place.

Anyway, if you automate IE using VBA you can navigate to a URL.

Once that's done you can create a reference to the page's 'document'.

That contains all the elements of the page, eg tables, frames, inputs etc.

In your case it's probably the table(s) you are interested in, and it's quite straightforward to extract just the data from the tables.

All you basically do is loop through all the tables, and for each table loop through the rows/columns and only return the text, though you can get the HTML if you want.

If you are interested and can post a complete HTML example I can post some example code, hopefully.

PS By complete, I just mean something with a full table with all the opening/closing tags etc
 
Upvote 0

Forum statistics

Threads
1,214,814
Messages
6,121,711
Members
449,049
Latest member
THMarana

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