如何获取电子表格 gem 中的工作表行数?

Mel*_*orn 5 rubygems ruby-on-rails

是否有任何属性可以获取行的大小?

@sheet = Spreadsheet.open(file.path).worksheet 0
@sheet.rows_count # why they didn't it?
Run Code Online (Sandbox Code Playgroud)

ced*_*ric 4

事实上,他们做到了 =>@sheet.count