`gem install roo-xls`
`ruby xls2csv.rb ~/Downloads/hoge.xls`
#!/usr/bin/env ruby | |
# cording: utf-8 | |
require 'roo-xls' | |
filename = ARGV[0] | |
xls = Roo::Excel.new(filename) | |
xls.sheets.map do |name| | |
puts "write: " + filename + "-" + name + ".csv" | |
File.write(filename + "-" + name + ".csv", xls.sheet(name).to_csv) | |
end | |