From: Ronald Fischer Date: 2007-09-18T16:39:21+09:00 Subject: Re: Creating Arrays > I have a .csz file created from a spreadsheet which contains > 666 rows and 19 columns. What I would like to do is read the > csz file into an array in ruby and store that array as a set > of columns and rows (like in excel). [snip] > My question is basically how do I do what I want to do?... It > is difficult for a new starter but I suspect you guys would > know it inside out! Since you want to mimic the spreadsheet idiom (a table of rows and columns), I suggest you create an "array of arrays". Something like (code not tested!): table=[] # create new array open("your filename goes here").each do |line| fields=[] # array of fields in each line line.each(',') { |field| fields << field.chomp(',').strip } table << fields end -- Ronald Fischer Phone: +49-89-452133-162