Sha256: d71d1de2bf238d7a616b403d719f0e00b6539c462511466ecc4283851a59fffd

Contents?: true

Size: 866 Bytes

Versions: 127

Compression:

Stored size: 866 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

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).to_s

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
rbbt-util-5.25.45 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.44 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.43 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.42 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.41 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.40 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.39 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.38 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.37 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.36 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.35 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.34 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.33 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.32 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.31 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.30 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.29 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.28 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.27 share/rbbt_commands/tsv/read_excel
rbbt-util-5.25.26 share/rbbt_commands/tsv/read_excel