title: rails - insert data to rows using spreadsheet
body: <p>I want to "run" iterative on my db, and insert the data into the rows.
  But, I keep getting the same error again and again </p>
  
  <blockquote>
    <p>"TypeError: no implicit conversion of Spreadsheet::Row into Integer"</p>
  </blockquote>
  
  <p>My code look like that:</p>
  
  <pre><code>book = Spreadsheet::Workbook.new
  sheet1 = book.create_worksheet
  sheet1.row(0).push "Time", "Name", "Phone", "Email"
  [0,1,2,3].each{|col| sheet1.column(col).width = 19}
  sheet1.each do |row|
    object.each do |o|
      sheet1.(row).push o.time, o.name, o.phone, o.email
    end
  end
  
  book.write '../excel.xls'
  </code></pre>
  
  <p>Thank you ahead guys!!!</p>