lib/xlsx/sheet.rb in simonmenke-xlsx-0.0.1 vs lib/xlsx/sheet.rb in simonmenke-xlsx-0.0.2
- old
+ new
@@ -24,9 +24,14 @@
when 's' then @workbook.strings[cell.value]
when 'n' then cell.value
end
end
+ def set_style(row, column, name)
+ cell = get_cell(row, column)
+ cell.style = ::XLSX::Cell::STYLES[name]
+ end
+
protected
def get_cell(row, column) # :nodoc:
hash = ::XLSX::Cell.storage_hash(row, column)
@data[hash] ||= ::XLSX::Cell.new(self, row, column)