From: "Jesús Gabriel y Galán" Date: 2013-02-05T01:15:02+09:00 Subject: Re: Nokogiri - Data output not as expected On Mon, Feb 4, 2013 at 5:01 PM, Barry Kavanagh wrote: > Thank you for your explanation Jesus but I am just not sure where to > reposition the code to fix this, sorry I am new to ruby. I don't know the spreadsheet API, but if you need to pass the row number, you will need to count how many lines you filled in in the previous step. So create a variable added_lines = 0, outside of all loops, and increment it with the number of lines after adding them to the spreadsheet. Also, change sheet[i,a] to sheet1[added_lines + i, a] Jesus.