Can't write to an xlsx spreadsheet

104 views
Skip to first unread message

fabian....@gmail.com

unread,
Mar 19, 2013, 3:56:10 PM3/19/13
to ruby...@googlegroups.com
Hey Guys,

How can I write to an xlsx spreadsheet? This is my code (as instructed in the webiste):

require 'rubygems'
require 'roo'
include Roo  # If I don;t put this, I get an error...

s = Excelx.new('test.xlsx')      # creates an Openoffice Spreadsheet instance
s.default_sheet = 'Backup'
s.set_value(14, 4, 'TEST')

And this is the error I get:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/roo-1.11.1/lib/roo/excelx.rb:536:in `block in read_labels': undefined method `split' for nil:NilClass (NoMethodError)

Ideas? I already did quite a lot of googling without luck...

Thanks!
Fabian

Reply all
Reply to author
Forward
0 new messages