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.



311
312
313
314
315
316
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 311

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