class RubyExcel::Cell
A single Cell
Public Class Methods
new( sheet, addr )
click to toggle source
Calls superclass method
RubyExcel::Element::new
# File lib/rubyexcel/element.rb, line 121 def initialize( sheet, addr ) fail ArgumentError, "Invalid Cell address: #{ addr }" unless addr =~ /\A[A-Z]{1,3}\d+\z/i super end
Public Instance Methods
to_s()
click to toggle source
The data at address as a String
# File lib/rubyexcel/element.rb, line 150 def to_s val.to_s end
value()
click to toggle source
Return the value at this Cell’s address
@return [Object ] the Object within the data, referenced by the address
# File lib/rubyexcel/element.rb, line 132 def value data[ address ] end
value=( val )
click to toggle source
Set the value at this Cell’s address
@param [Object] val the Object to write into the data
# File lib/rubyexcel/element.rb, line 142 def value=( val ) data[ address ] = val end