Specify starting point of foreach enumerator in ruby -
i have rake file pulls in data external csv file , enumerates through with:
csv.foreach(file, :headers => true) |row|
what effective way (in ruby) specify starting point within spreadsheet?
:headers => true allows me start importing second line, if want start line 20?
use .drop(#rows ignore):
csv.open(file, :headers => true).drop(20).each |row|
Comments
Post a Comment