ruby parseexecel gem - array not implemented

Posted by josh on Stack Overflow See other posts from Stack Overflow or by josh
Published on 2010-04-27T22:11:37Z Indexed on 2010/04/27 22:13 UTC
Read the original article Hit count: 273

Filed under:
|

I am trying to work with two worksheets at the same time.

So I have code

require 'parseexcel'
#Open the excel file passed in from the commandline
workbook = Spreadsheet::ParseExcel.parse(ARGV[0])
workbook2 = Spreadsheet::ParseExcel.parse(ARGV[1])

#Get the first worksheet
worksheet = workbook.worksheet(0)
worksheet2 = workbook2.worksheet(0)

However, when I run this code I get an error: array is not implemented

This error goes away when I comment out line:

workbook2 = Spreadsheet::ParseExcel.parse(ARGV[1])

Why is this happeneing?

Way I am running script is: ruby -rubygems traverse.rb excel.xls so.xls

© Stack Overflow or respective owner

Related posts about ruby

Related posts about parse