I am using 'roo' gem for reading and开发者_如何学C writing the excel sheets. How can I get the last column of each row in excel sheet using 'roo' gem in Ruby
Please give me some suggestion on this...
You can do the following:
wb = Roo::Excelx.new 'somepath/somefile.xlsx'
1.upto(wb.last_row) do |row_index|
last_column = wb.cell(row_index, wb.last_column)
end
http://roo.rubyforge.org/
You can use a for
with the method last_column
as stated on the link above.
精彩评论