Method: Axlsx::Cell#style=

Defined in:
lib/axlsx/workbook/worksheet/cell.rb

#style=(v) ⇒ Integer

Returns The cellXfs item index applied to this cell.

Returns:

  • (Integer)

    The cellXfs item index applied to this cell.

Raises:

  • (ArgumentError)

    Invalid cellXfs id if the value provided is not within cellXfs items range.



293
294
295
296
297
298
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 293

def style=(v)
  Axlsx::validate_unsigned_int(v)
  count = styles.cellXfs.size
  raise ArgumentError, "Invalid cellXfs id" unless v < count
  @style = v
end