Hi All
Getting the below error when running the source code
My requirement is : I want read / write the excel sheet ( both xls /
xlsx )
from Ruby , if you have any other solution also share with me …
Source Code :
*
*
*
bash-3.2$ cat rubyXL.rb
require ‘rubyXL’
workbook = RubyXL::Parser.parse(“test.xlsx”)
workbook = RubyXL::Workbook.new
sheet_Name = workbook.worksheets[0]
puts sheet_Name
ERROR
rubyXL.rb
/usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
*require': cannot load such file -- nokogiri (LoadError)* from /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require’
from
/Users/mselv2/.rvm/gems/ruby-1.8.7-p371/gems/rubyXL-1.2.10/lib/rubyXL/writer/content_types_writer.rb:6:in
<top (required)>' from /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require’
from
/usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require' from /Users/mselv2/.rvm/gems/ruby-1.8.7-p371/gems/rubyXL-1.2.10/lib/rubyXL/workbook.rb:1:in
<top (required)>’
from
/usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require' from /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require’
from
/Users/mselv2/.rvm/gems/ruby-1.8.7-p371/gems/rubyXL-1.2.10/lib/rubyXL.rb:2:in
<top (required)>' from /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in
require’
from
/usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in
rescue in require' from /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in
require’
from rubyXL.rb:1:in `’
Installed rubyXL also :
*
*
bash-3.2$ gem list | grep “XL”
rubyXL (1.2.10)
Thanks ,
Muthu S. SR