To work, I opened two classes to add methods that help me get to the I / O object.
Excel.class_eval do
def get_workbook
@workbook
end
end
Spreadsheet::Excel::Workbook.class_eval do
def get_io
@io
end
end
Then my processing code now looks like this:
xls = Excel.new(@@filename)
...
xls.get_workbook.get_io.close
source
share