eirikur
asked on
Converting HTML table in CSV
Hi,
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:
<table>
<tr>
<td>Title 1</td>
<td>Amount 1</td>
</tr>
<tr>
<td>Title 2</td>
<td>Amount 2</td>
</tr>
etc...
</table>
Thank you for helping.
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:
<table>
<tr>
<td>Title 1</td>
<td>Amount 1</td>
</tr>
<tr>
<td>Title 2</td>
<td>Amount 2</td>
</tr>
etc...
</table>
Thank you for helping.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
I load the page into firefox, select all, paste the page into my favorite editor (textpad.com) 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 ;
Michel
Save as csv and voila. If your excel can use tab-delimited csv, you can skip the change \t to ;
Michel
have to use a real programming language to do it. Take a look at the javascript
code here:
http://www.laurenceholbrook.com/TechnicalInformation/JavaScript_DOM_Excel_AutoFit_Graph_CSV.html