Sha256: 878005b8f6caf32109c1471d029bb31c74ab61b2991e5819f685bb0b52fe06fb
Contents?: true
Size: 357 Bytes
Versions: 1
Compression:
Stored size: 357 Bytes
Contents
#! /usr/bin/env ruby require 'csv' require 'roo' require 'roo-xls' path, sheet = ARGV.first.split(':') unless File.exists?(path) puts "Not found file" puts "Usage: tocsv /path/to/your/file.xlsx > data.csv" exit end xlsx = Roo::Spreadsheet.open(path) str = CSV.generate do |csv| xlsx.sheet(sheet.to_i).to_a.each { |row| csv << row } end puts str
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tocsv-0.1.0 | exe/tocsv |