zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

Howto iterate over columns #143

Closed computerlyrik closed 9 years ago

computerlyrik commented 9 years ago

Hi, i am parsing a xls-File.

How do i walk over the existing file columnwise?

worksheet.columns => []

Thank you!

computerlyrik commented 9 years ago

Goal is to have something like

worksheet.columns.each do |column|
  #do some freaky stuff with column and then:
  column.each_with_index do |cellvalue, rowindex|
   logger.debug "On Row #{rowindex} ; Value #{cellvalue}
  end
end
zdavatz commented 9 years ago

Please ask this question over here on the mailing list. https://groups.google.com/forum/#!forum/rubyspreadsheet