Sha256: c56a475843e0d70eeaa7f5117232a5617146c8a9d88cb51d58a65ae5f8dd01bf

Contents?: true

Size: 729 Bytes

Versions: 34

Compression:

Stored size: 729 Bytes

Contents

#!/usr/bin/env ruby

require 'rbbt-util'
require 'rbbt/util/simpleopt'

$0 = "rbbt #{$previous_commands*""} #{ File.basename(__FILE__) }" if $previous_commands

options = SOPT.setup <<EOF

Description

$ rbbt tsv read_excel [options] <filename.xls|filename.xlsx>

Use - to read from STDIN

-k--key_field* Key field
-f--fields* Fields
-t--type* Type
-m--merge Merge from multiple rows
-s2--sep2* Second level separator. Default /[,|]\\s?/
-h--help Print this help

EOF
if options[:help]
  if defined? rbbt_usage
    rbbt_usage 
  else
    puts SOPT.doc
  end
  exit 0
end

excelfile = ARGV.first

raise ParameterException, "No excel file given" if excelfile.nil?

require 'rbbt/tsv/excel'
puts TSV.excel(excelfile, options).to_s

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
rbbt-util-5.21.94 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.93 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.92 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.91 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.90 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.89 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.87 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.86 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.85 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.84 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.83 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.81 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.80 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.78 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.77 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.76 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.75 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.74 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.73 share/rbbt_commands/tsv/read_excel
rbbt-util-5.21.72 share/rbbt_commands/tsv/read_excel