I want to get second to fourth column of a Excel file by using Roo::Excel
class.
columns = []
columns << Roo::Excel.new("foo.xls").column(2)
columns << Roo::Excel.new("foo.xls").column(3)
columns << Roo::Excel.new("foo.xls").column(4)
I'm writing code redundantly because Roo::Excel.new("foo.xls")
itself doesn't return a value even if I wait per minutes, but if I chain the method column()
then it returns a Array
instantly.
Is there a DRY way to write the code above?
This is the Excel file I'm trying to read.
http://www.tse.or.jp/listing/kessan/b7gje600000057pv-att/kessan10_1121.xls
How about this Ruby's range ?