Skip to content

Instantly share code, notes, and snippets.

@G-Square
G-Square / table_to_csv.rb
Last active October 15, 2015 01:30 — forked from sandys/table_to_csv.rb
convert a html table to CSV using ruby
#Thanks to Sandeep Srinivasa
#Enhanced for MySQL and phpMyAdmin CSV imports
require 'rubygems'
require 'nokogiri'
require 'csv'
#check for input file
if (!ARGV[0].nil? && File.file?(ARGV[0]))
puts ARGV[0]
file = File.open(ARGV[0])