Method: Axlsx::Workbook#add_worksheet

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

#add_worksheet(options = {}) {|worksheet| ... } ⇒ Worksheet

Adds a worksheet to this workbook

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • name (String)

    The name of the worksheet.

Yields:

  • (worksheet)

Returns:

See Also:



115
116
117
118
119
# File 'lib/axlsx/workbook/workbook.rb', line 115

def add_worksheet(options={})
  worksheet = Worksheet.new(self, options)
  yield worksheet if block_given?
  worksheet
end