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

Popular posts from this blog

Change the color of an oval at click in Java AWT -

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -