No commit activity in last 3 years
No release in over 3 years
Fast parsing xls to the hash
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
>= 0
~> 10.0
~> 3.0

Runtime

 Project Readme

FastXlsToHash

Code Climate

This gem can to convert your xls to hash ! Really cool ! It's amazing gem, it's true.

example: { :list_1 => 
             { :row_1 => 
               { :column_1 => 'value',
                 :column_2 => 100,
                 :column_3 => #<DateTime: 2016-11-01T00:00:00+00:00>
               },
               :row_2 => 
               { :column_1 => 'value2',
                 :column_2 => 200,
                 :column_3 => #<DateTime: 2016-12-01T00:00:00+00:00>
               }
             },
           :list_2 => {...} 
         }

or if you want to use xls style of names

FastXlsToHash.with_xls_style = true
example: { :list_1 => 
             { :'1' => 
               { :A => 'value',
                 :B => 100,
                 :C => #<DateTime: 2016-11-01T00:00:00+00:00>
               },
               :'2' => 
               { :A => 'value2',
                 :B => 200,
                 :C => #<DateTime: 2016-12-01T00:00:00+00:00>
               }
             },
           :list_2 => {...} 
         }

Installation

Add this line to your application's Gemfile:

gem 'fast_xls_to_hash'

And then execute:

$ bundle

Install it yourself as:

$ gem install fast_xls_to_hash

Usage

e.g. in rails

class Example

  include FastXlsToHash
  FastXlsToHash.with_xls_style = true          #optional, default false

  dir_of_xls  = '/data/test.xls'
  hash_of_xls = ParseXls.to_hash(dir_of_xls)

end

Contributing

  1. Fork it
  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 new Pull Request

License

The gem is available as open source under the terms of the MIT License.