-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a basic example of opening an xls 2003 spreadsheet to readme #8
Comments
After installing the gem, does one just add "require 'roo-xls" (along with require "roo") to your class, and then use roo on the xls file as you would with other speadsheet files, which are supported by roo alone? That's just a guess, so even a few lines of 'how to use it' would be very helpful. |
I see the issue is closed. is this the correct usage, then? |
@JoseMPena I apologize, I closed this because it was old. The correct usage is like this: begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "roo-xls"
gem "minitest"
end
require "roo-xls"
require "minitest/autorun"
class BugTest < Minitest::Test
def test_stuff
sheet = Roo::Excel.new('/Users/gturner/downloads/table.xls')
puts sheet.row(1)
end
end You only need the |
Taken from roo-rb#8 (comment)
Thanks for the gem. I'm trying to open a Microsoft Excel 97-2004 Worksheet with:
and getting the error
Ole::Storage::FormatError: OLE2 signature is invalid
.I'm not confident I'm using this correctly, a simple example of opening a file would make a very useful addition to the readme. Anything would be better than nothing ;)
Thanks again
The text was updated successfully, but these errors were encountered: