change csv file into html table

P

Pen Ttt

there is csv class showtable() function to change csv file into html
table,can i make it in ruby?
 
R

Robert Klemme

2010/6/1 Pen Ttt said:
there is csv class showtable() function to change csv file into html
table,can i make it in ruby?

Yes.

Kind regards

robert
 
R

Robert Klemme

2010/6/1 Pen Ttt said:
how to do it ?

Open a file for writing, use a CSV library to read the CSV file, write
each record as HTML to the opened file (potentially using another
library, e.g. CGI or ERB) and be done. What did you try so far?

Cheers

robert
 
P

Pen Ttt

for example ,there is a csv file , two rows two coulums
2,3
4,5

how to write a ruby program with erb or cgi
to get the html file:
<table >
<tr>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
</tr>
</table>
 
R

Robert Klemme

for example ,there is a csv file , two rows two coulums
2,3
4,5

how to write a ruby program with erb or cgi
to get the html file:

You open your favorite text editor or IDE and type in all the commands
you need (i.e. as I indicated earlier) to get the program completed.

This is a public forum denoted to the _discussion_ of Ruby topics - not
a free implementation service. If you need introductory material I
suggest you explicitly ask for it.

Cheers

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top