I'm trying to work with excel files(xlsx) in ruby using rubyXl. I have no problem writing but can't get to output the content of a cell.
require 'rubyXL'
workbook = RubyXL::Workbook.new
workbook.worksheets[0].add_cell(5,5,"test")
workbook.write("file3.xlsx")
getcell = RubyXL::Parser.parse("file3.xlsx")
print getcell[0][5][5]
When I run it in cmd I just get this and it changes every time I run the code.
D:\KEA\1.semester\Exams\IT exam>ruby test.rb
#<RubyXL::Cell:0x2e4a600>
SOLUTION:
After reading a few more times I found the answer in
http://rubydoc.info/gems/rubyXL/1.1.12/RubyXL/Cell
It should have been
print getcell[0][5][5].value
After reading a few more times I found the answer in
http://rubydoc.info/gems/rubyXL/1.1.12/RubyXL/Cell
It should have been
print getcell[0][5][5].value