title: Roo Gem Check for Empty Worksheet
body: <p>I am using the roo gem to parse Excel (xlsx) files. However, there are always some empty sheets in the file (workbook). Is there a way in roo to see if the sheet is empty or <code>nil</code>?</p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>wb = Roo::Excelx.new 'chapter_data.xlsx'
  
      wb.sheets.each do |sheet|
        wb.default_sheet = sheet
        unless wb.nil?
         code.....
        end
     end
  </code></pre>
  
  <p>The <code>wb.nil?</code> doesn't work it returns false.</p>
  
  <p><strong>Update</strong>
  The only way I have been able to handle this issue is to rescue the no method error. I don't like handling it this way looking for a better way to check if the sheet is empty.</p>
  
  <pre><code>begin
     header_row = wb.row(1)
   rescue NoMethodError =&gt; err
     # do nothing, this sheet is empty can't find a way to check if it is empty pos
   end
  </code></pre>