Converting HTML table in CSV

Posted on 2006-05-02
Last Modified: 2008-02-01

I'm searching for an easy and quick way to convert a HTML file containing a table with i.e. data written like this (i shortened the code a little ;)  to a CSV file:


<td>Title 1</td>
<td>Amount 1</td>

<td>Title 2</td>
<td>Amount 2</td>



Thank you for helping.
Question by:eirikur
    LVL 26

    Expert Comment

    Well, you are not going to be able to do it with just HTML code, you are going to
    have to use a real programming language to do it. Take a look at the javascript
    code here:

    LVL 26

    Accepted Solution

    BTW, My last comment was not meant to say that javascript was a *real* programming language.
    LVL 1

    Expert Comment

    If you don't need a programmatic way of doing this, you can just select all the text in the table as it's rendered in the browser and paste it into Excel.  Then save as a CSV file.
    LVL 75

    Expert Comment

    by:Michel Plungjan
    I load the page into firefox, select all, paste the page into my favorite editor ( and change all \t to ; with the regexp checkbox checked.
    Save as csv and voila. If your excel can use tab-delimited csv, you can skip the change \t to ;


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Introduction This warning has to be one of the most commonly issued warnings in the history of PHP.  The article explains why this warning arises and what to do to mitigate the problem. How this Happens HTTP headers include many different kinds…
    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now