HTML to excel worksheet where tag become column heaters |
HTML to excel worksheet where tag become column heaters |
HtmlKook |
Jan 16 2013, 06:25 PM
Post
#1
|
Group: Members Posts: 2 Joined: 16-January 13 Member No.: 18,464 |
Hi everyone,
after much trying and search I am have to surrender and ask for help once more. I need to import data from a html file to excel. I have tried opening the file in excel and the web query, both methods work fine but the issue is the following: excel opens the file but recognises only two columns and displays the data in the two columns. What I need on the other hand is to delete the first row, and then use the first column to create column heaters and then fill in the data from column two below the appropriate column heaters. Now my import looks like this HD TEXT WC TEXT PD TEXT SN TEXT SC TEXT LA TEXT CY TEXT HD TEXT WC TEXT PD TEXT SN TEXT LP TEXT TD TEXT RE TEXT The spreadsheet after import should look something like this: HD WC PD SN SC LA CY LP+TD RE PUB AN TEXT TEXT TEXT TEXT TEXT TEXT TEXT etc TEXT TEXT TEXT TEXT TEXT TEXT TEXT etc TEXT TEXT TEXT TEXT TEXT TEXT TEXT etc So basically I need to find all the unique column headers in and then fill the content corresponding to these heaters in the row below. I something like this at all possible? I have also attached the html file for reference. Any help or suggestions would be appreciated. Kind regards, HtmlKook Attached File(s) Example.htm ( 248.29k ) Number of downloads: 2180 |
Christian J |
Jan 16 2013, 07:51 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
excel opens the file but recognises only two columns and displays the data in the two columns. That's how the web page's tables are arranged as well. QUOTE I something like this at all possible? Possible but tedious. For a single web page you might create new HTML tables and paste the text into them manually (or do the same with Excel). If there are many more pages like this, there might be way to do it automatically (personally I've used javascript for cleaning up pages in a similar way). OTOH you posted this in the Database forum. If you have access to the DB (or the server-side script that creates web pages from the DB query) you might be able to make it out the data in the form you like. |
HtmlKook |
Jan 23 2013, 11:02 PM
Post
#3
|
Group: Members Posts: 2 Joined: 16-January 13 Member No.: 18,464 |
Thanks a lot Christian J.
Unfortunately, I do not have access to the back end of the database otherwise I am sure that there would be quite an easy solution. There are actually a lot of html documents and copy and pasting is not a option. I thought that it might be a tedious job and that some scripting might be involved but was just not sure if there were any readily available solutions. I am not a programmer so had to get someone who can write a script like this. Thanks a again! HtmlKook |
Lo-Fi Version | Time is now: 28th March 2024 - 02:57 AM |