0.0
No commit activity in last 3 years
No release in over 3 years
Meaningful spreadsheet access
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.7.6
>= 10.0, ~> 10.0
>= 3.2.0, ~> 3.2
>= 1.2.0, ~> 1.2
>= 0.10.0, ~> 0.10
>= 0.8.7, ~> 0.8
>= 0.1, ~> 0.1

Runtime

< 5.0, >= 3.0
>= 2.0.0, ~> 2.0
>= 1.0.0, ~> 1.0
 Project Readme

Build Status

roo-hasherize

Built on top of the roo gem for easy abstraction of spreadsheet types supported by roo as tabular data input. Assumes the first row to be headings with keys and forms clean Ruby hashmaps for all consecutive rows using cells as values for respective keys.

Rationale

Originally it was a fork of batch_factory repo. Rewritten almost from scratch. The main reason is to provide faster and predictable release cycles.

Installation

Add this line to your Gemfile

gem 'roo-hasherize'

or

gem install roo-hasherize

Usage examples

hash = Roo::Hasherize.call(target, options)

options are:

  • keys - Use it only if your dataset doesn't contain headers
  • sheet - Number of sheet to hasherize (only makes sense for spreadsheets)
  • extension - To explicityly specify file format

Spreadsheet type is detected by the file extension (xls, xlsx, ods), files without extension considered csv. Also, this can be specified explicitly with the extension option:

All other (roo specific) options are passed as is down to a corresponding file type handler class, e.g. csv_options is passed to Roo::CSV

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/xftp/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request