Method: RubyExcel::Address#offset

Defined in:
lib/rubyexcel/address.rb

#offset(address, row, col) ⇒ String

Offsets an address by row and column

Parameters:

  • address (String)

    the address to offset

  • row (Fixnum)

    the number of rows to offset by

  • col (Fixnum)

    the number of columns to offset by

Returns:

  • (String)

    the new address



140
141
142
# File 'lib/rubyexcel/address.rb', line 140

def offset(address, row, col)
  ( col_letter( address_to_col_index( address ) + col ) ) + ( row_id( address ) + row ).to_s
end