Greetings!

What I have is a .csv file (comma separated and quote delimited):

"BegDoc","EndDoc","New"
"Doc1BegDoc","Doc1EndDoc","Test1"
"Doc2BegDoc","Doc2EndDoc",""
"Doc3BegDoc","Doc3EndDoc","Test2"
"Doc4BegDoc","Doc4EndDoc",""
"Doc5BegDoc","Doc5EndDoc","New"

I can read the lines of the file with this:

require 'CSV'
csvData = CSV.readlines("C:\\temp\\geoff\\filldown\\filldown.txt")

Now what I want to do is check for blanks and when I find one I want to
take the info from the entry directly above and fill down the column
until the next blank. Using the above example, I want the following
output:

"BegDoc","EndDoc","New"
"Doc1BegDoc","Doc1EndDoc","Test1"
"Doc2BegDoc","Doc2EndDoc","Test1"
"Doc3BegDoc","Doc3EndDoc","Test2"
"Doc4BegDoc","Doc4EndDoc","Test2"
"Doc5BegDoc","Doc5EndDoc","New"

Any help is greatly appreciated!

Thanks,

Geoff