Project

read_excel

0.0
No commit activity in last 3 years
No release in over 3 years
utility for reading excel file both .xls and .xlsx.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

ReadExcel

This ReadExcel rubygem can handle existing excel file both *.xlsx and *.xls. It can only get cell's value and sheet name of excel file.

Installation

Add this line to your application's Gemfile:

gem 'read_excel'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install read_excel

Usage

require 'read_excel'

workbook = ReadExcel.new('/path/to/excel_file')

sheet_count = workbook.worksheets.count

worksheets = workbook.worksheets

worksheets.each do |worksheet|
  p worksheet.name
end

worksheet = worksheets[0]

row_values = worksheet.row(0)  # (row, col) = (0, 0) = 'A1'
p row_values[0]  # 'A1'
p row_values[2]  # 'C1'

row_values = worksheet.row(10000)
row_values.empty? # => true   empty row returns []

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cxn03651/read_excel. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

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

Code of Conduct

Everyone interacting in the ReadExcel project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.