Method: Axlsx::Worksheet#print_options

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

Options for printing the worksheet.

Examples:

wb = Axlsx::Package.new.workbook
# using options when creating the worksheet.
ws = wb.add_worksheet :print_options => {:grid_lines => true, :horizontal_centered => true}

# use the set method of the page_margins object
ws.print_options.set(:headings => true)

# set page margins in a block
ws.print_options do |options|
  options.horizontal_centered = true
  options.vertical_centered = true
end

Yields:

Returns:

See Also:



231
232
233
234
235
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 231

def print_options
  @print_options ||= PrintOptions.new
  yield @print_options if block_given?
  @print_options
end