Sha256: 695fc505380fd450902a672be6ed0c15a2c06aebea651e7983188399d7942ddd

Contents?: true

Size: 905 Bytes

Versions: 249

Compression:

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

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

249 entries across 249 versions & 1 rubygems

Version Path
rbbt-util-5.32.26 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.25 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.24 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.23 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.22 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.21 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.20 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.18 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.17 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.16 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.15 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.13 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.12 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.11 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.10 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.9 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.7 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.6 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.5 share/rbbt_commands/tsv/read_excel
rbbt-util-5.32.4 share/rbbt_commands/tsv/read_excel