Fastest way to convert a csv to html

The best-(fastest and then simplest) way to convert a csv to html?

···

--
Posted via http://www.ruby-forum.com/.

This must be pretty close to the fastest/simplest - not sure about 'best' :wink:

ruby -pe 'BEGIN{puts "<html><body>"};END{puts "</body></html>"}' test.csv > test.html

···

On 13.08.2012 16:21, ajay paswan wrote:

The best-(fastest and then simplest) way to convert a csv to html?

--
Alex Gutteridge

Alex Gutteridge wrote in post #1072225:

···

On 13.08.2012 16:21, ajay paswan wrote:

The best-(fastest and then simplest) way to convert a csv to html?

This must be pretty close to the fastest/simplest - not sure about
'best' :wink:

ruby -pe 'BEGIN{puts "<html><body>"};END{puts "</body></html>"}'
test.csv > test.html

I would add <pre> and </pre> to the begin and end sections.

--
Posted via http://www.ruby-forum.com/\.