RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 801
- Office Version
- 365
- Platform
- Windows
Hello all,
I have a block of HTML that I need to table'ise in Excel.
The format of this data is unfortunately a gigantic block of HTML code with the relevant fields scattered within. It looks like this.
You may have to quote my post to get the HTML tags as this forum auto-displays them.
What I would like to do is separate all the fields into columns which have the following headers:
Title
Initial
Surname
Addr1
Addr2
Addr3
Addr4 (If there is a result)
Postcode
Phone
Room Req
Tour
Pickup
Thus, the following data would be as follows:
Title - Mrs
Initial - F
Surname - Ake
Addr1 - 12 Madeup Villas
Addr2 - Phoneyton
Addr3 - City of Not
Addr4 -
Postcode - FF4 K3Y
Phone - 01234567891
Room Req - Twin
Tour -123456
Pickup - City of Not
So how to do this.. I think if I can search for n instances of {td}%{/} (where { is < and % is wildcard) then I could potentially identify each field, then assigning each field to each column. So in the above example, the first instance of {td}%{/td} is "Mrs F Ake" then I could split each string out via the spaces into the relevant columns.
What do you think, is this possible?
I have a block of HTML that I need to table'ise in Excel.
The format of this data is unfortunately a gigantic block of HTML code with the relevant fields scattered within. It looks like this.
[TABLE="width: 326"]
<tbody>[TR]
[TD][/TD]
Mrs Ake would like the following rooms:
Additional Notes: ONLY WANTS THIS HOLIDAY AND A TWIN ROOM.
- 1 Twin
For tour: 123456 -
Staying at: Selected Hotel, Yorkshire
on Saturday 19 March 2016 for 2 nights
Picking up from City of Not
<tbody>
</tbody>
[/TR]
</tbody>[/TABLE]
You may have to quote my post to get the HTML tags as this forum auto-displays them.
What I would like to do is separate all the fields into columns which have the following headers:
Title
Initial
Surname
Addr1
Addr2
Addr3
Addr4 (If there is a result)
Postcode
Phone
Room Req
Tour
Pickup
Thus, the following data would be as follows:
Title - Mrs
Initial - F
Surname - Ake
Addr1 - 12 Madeup Villas
Addr2 - Phoneyton
Addr3 - City of Not
Addr4 -
Postcode - FF4 K3Y
Phone - 01234567891
Room Req - Twin
Tour -123456
Pickup - City of Not
So how to do this.. I think if I can search for n instances of {td}%{/} (where { is < and % is wildcard) then I could potentially identify each field, then assigning each field to each column. So in the above example, the first instance of {td}%{/td} is "Mrs F Ake" then I could split each string out via the spaces into the relevant columns.
What do you think, is this possible?