René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Filling a HTML table with values of a CSV file

With Internet Explorer, it is possible to read a csv file (which resides on the web server) into a HTML table.

data.csv

The following file (data.csv) will be read into the table:
data.csv
number:Int,english,french,german
1,one,un,eins
2,two,deux,zwei
3,three,trois,drei
4,four,quattre,four
5,five,cinque,fuenf
6,six,six,sechs
7,seven,sept,sieben
8,eight,huit,acht
9,nine,neuf,neun
10,ten,dix,zehn

The html document

read_data.html
<html>
<head><title>Reading values into a table</title></head>
<body>

<table datasrc='#data'>
  
  <thead>
     <tr><th>Number</th><th>English</th><th>French</th><th>German</th></tr>
  </thead>

  <tbody> <tr>
     <td><span datafld='number'> </span></td>
     <td><span datafld='english'></span></td>
     <td><span datafld='french'> </span></td>
     <td><span datafld='german'> </span></td>
  </tbody>

</table>


<object ID=data classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
  <param nAme="DataURL" value="data.csv">
  <param nAme="UseHeader" value="true">
</object>

</body>
</html>
The keyword for this functionality is: Tablular Data Control.