Method: RubyXL::LegacyCell#change_contents
- Defined in:
- lib/rubyXL/cell.rb
#change_contents(data, formula = nil) ⇒ Object
changes contents of cell, with formula option
141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/rubyXL/cell.rb', line 141 def change_contents(data, formula=nil) validate_worksheet self.datatype = RAW_STRING case data when Date then data = workbook.date_to_num(data) when Integer, Float then self.datatype = '' end self.raw_value = data @formula = formula end |