GitXplorerGitXplorer
a

single_xlsx

public
4 stars
1 forks
1 issues

Commits

List of commits on branch master.
Verified
233915f4937bc79a76aeef2fe8352fb40aece23f

Merge pull request #2 from a2ikm/update-ruby-versions

aa2ikm committed 4 years ago
Unverified
5cdc275d2cfbba2681bfa7c5573e7f6aa69617ba

Update CRuby matrix test

aa2ikm committed 4 years ago
Unverified
4b1553f71e562ef0e8681d5d9df4e1bea97e98ff

Bump version to v0.1.0

aa2ikm committed 5 years ago
Unverified
e9eca6e68672a1c73d64410f1660fd488c1e3b9e

Relax gem versions

aa2ikm committed 5 years ago
Unverified
4b835aa9e6591255f832be052bcaa58195aa1d90

Update README

aa2ikm committed 10 years ago
Unverified
89fa7fa2e216967d93461d202dbde60e6e9e8ee0

Add SingleXLSX.open method to write XLSX file

aa2ikm committed 10 years ago

README

The README file for this repository.

Build Status

SingleXLSX

SingleXLSX wraps rubyXL to read and write single-sheet XLSX files like ruby's standard CSV library.

Installation

Add this line to your application's Gemfile:

gem 'single_xlsx'

And then execute:

$ bundle

Or install it yourself as:

$ gem install single_xlsx

Usage

Read

You can read XLSX files into Array of Array.

Name Age
Einstein 76
Feynman 69
require "single_xlsx"

SingleXLSX.read("path/to/xlsx")
#=> [
      ["Name", "Age"],
      ["Einstein", 76],
      ["Feynman", 69]
    ]

Write

You can write XLSX data into String.

require "single_xlsx"

binary = SingleXLSX.generate do |sheet|
  sheet << ["Name", "Age"]
  sheet << ["Einstein", 76]
  sheet << ["Feynman", 69]
end

or into a file.

require "single_xlsx"

SingleXLSX.open("path/to/xlsx") do |sheet|
  sheet << ["Name", "Age"]
  sheet << ["Einstein", 76]
  sheet << ["Feynman", 69]
end

Contributing

  1. Fork it ( https://github.com/a2ikm/single_xlsx/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