Link to home
Start Free TrialLog in
Avatar of psytajl
psytajl

asked on

Convert HTML to CSV

I need to find some software to convert an html table into a csv file. Does anyone know how to do it?
ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could use regular expressions and script to parse the html and data in the table and write to another file.
Avatar of snookie
snookie

hey dude,
its best to use IE's DOM for this..

you can loop through elements:

Dim sTextForCSVFile

For i = 0 To objIE.Document.All.length - 1
            If objIE.Document.All(i).Tagname = "tr" Then
                sTextForCSVFile = sTextForCSVFile & vbcrlf
            End If
               If objIE.Document.All(i).Tagname = "td" Then
                sTextForCSVFile = sTextForCSVFile & objIE.Document.All(i).innerHTML & ","
            End If
Next

Need to lookup the code for creating the objIE though

check out this post on Visual Basic:

https://www.experts-exchange.com/questions/20375581/WebBrowser-DOM-link-problem.html

Good Luck..
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I may recommend DELETE unless it is clear
   to me that it has value as a PAQ.  Silence = you don't care
</note>

Cd&
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to webwoman

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange