Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何属性来获取行的大小?
@sheet = Spreadsheet.open(file.path).worksheet 0 @sheet.rows_count # why they didn't it?
事实上,他们做到了=>@sheet.count
@sheet.count
如果您使用的是 RubyXL,请使用以下内容获取行数。
rowCount = worksheet.sheet_data.rows.size colCount = worksheet.cols.size