Calexcer
Convert excel sheet to object as calendar.
Installation
Add this line to your application's Gemfile:
gem 'calexcer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install calexcer
Usage
require "calexcer"
book = Calexcer::Book.new("PATH/TO/excel.xls") # => Calexcer::Book
sheet = book.sheets[0] # => Calexcer::Sheet
v_sheet = sheet.vertical_sheet # => Calexcer::VerticalSheet
v_sheet.to_hash
# => { date_1 => ["one day event", "repeat event 1"], date_2 => ["repeat event 1", "repeat event 2"], date_3 => ["repeat event 2"] }
v_sheet.to_hashr
# => { "one day event" => [date_1], "repeat event 1" => [date_1, date_2], "repeat event 2" => [date_2, date_3] }
Contributing
- Fork it ( https://github.com/sekizo/calexcer/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request