Method: GoogleDrive::Worksheet#update_cells

Defined in:
lib/google_drive/worksheet.rb

#update_cells(top_row, left_col, darray) ⇒ Object

Updates cells in a rectangle area by a two-dimensional Array. top_row and left_col specifies the top-left corner of the area.

e.g.

worksheet.update_cells(2, 3, [["1", "2"], ["3", "4"]])


209
210
211
212
213
214
215
# File 'lib/google_drive/worksheet.rb', line 209

def update_cells(top_row, left_col, darray)
  darray.each_with_index do |array, y|
    array.each_with_index do |value, x|
      self[top_row + y, left_col + x] = value
    end
  end
end