开发者

roo gem in Ruby

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜