Sha256: 6c4d1dce3915f4e7ba8a018a24ebb49c023845a5d8f64cd57015990f81de3063

Contents?: true

Size: 991 Bytes

Versions: 81

Compression:

Stored size: 991 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
-z--zipped Assume data is zipped when merging (default is true)
-s2--sep2* Second level separator. Default /[,|]\\s?/
-h--help Print this help
-s--sheet* Sheet to extract
-skip--skip_rows* Initial rows to skip
-o--original Dump the rows without parsing them into TSV
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?

options[:zipped] ||= true if options[:merge]
require 'rbbt/tsv/excel'
puts TSV.excel(excelfile, options.merge(:text => options[:original]))

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
rbbt-util-5.44.1 share/rbbt_commands/tsv/read_excel
rbbt-util-5.43.0 share/rbbt_commands/tsv/read_excel
rbbt-util-5.42.0 share/rbbt_commands/tsv/read_excel
rbbt-util-5.41.1 share/rbbt_commands/tsv/read_excel
rbbt-util-5.41.0 share/rbbt_commands/tsv/read_excel
rbbt-util-5.40.5 share/rbbt_commands/tsv/read_excel
rbbt-util-5.40.4 share/rbbt_commands/tsv/read_excel
rbbt-util-5.40.3 share/rbbt_commands/tsv/read_excel
rbbt-util-5.40.0 share/rbbt_commands/tsv/read_excel
rbbt-util-5.39.0 share/rbbt_commands/tsv/read_excel
rbbt-util-5.38.1 share/rbbt_commands/tsv/read_excel
rbbt-util-5.38.0 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.16 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.15 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.14 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.13 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.12 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.11 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.10 share/rbbt_commands/tsv/read_excel
rbbt-util-5.37.9 share/rbbt_commands/tsv/read_excel