Class: Axlsx::SheetCalcPr

Inherits:
Object
  • Object
show all
Defined in:
lib/axlsx/workbook/worksheet/sheet_calc_pr.rb

Overview

the SheetCalcPr object for the worksheet This object contains calculation properties for the worksheet.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ SheetCalcPr

creates a new SheetCalcPr

Parameters:

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

    Options for this object

  • [Boolean] (Hash)

    a customizable set of options



10
11
12
13
14
15
# File 'lib/axlsx/workbook/worksheet/sheet_calc_pr.rb', line 10

def initialize(options={})
  @full_calc_on_load = true
  options.each do |key, value|
    self.send("#{key}=", value) if self.respond_to?("#{key}=")
  end
end

Instance Method Details

#full_calc_on_loadBoolean

Indicates whether the application should do a full calculate on load due to contents on this sheet. After load and successful cal,c the application shall set this value to false. Set this to true when the application should calculate the workbook on load.

Returns:

  • (Boolean)


22
23
24
# File 'lib/axlsx/workbook/worksheet/sheet_calc_pr.rb', line 22

def full_calc_on_load
  @full_calc_on_load
end

#full_calc_on_load=(value) ⇒ Object

specify the full_calc_on_load value

Parameters:

  • value (Boolean)

See Also:



29
30
31
32
# File 'lib/axlsx/workbook/worksheet/sheet_calc_pr.rb', line 29

def full_calc_on_load=(value)
  Axlsx.validate_boolean(value)
  @full_calc_on_load = value
end

#to_xml_string(str = '') ⇒ String

Serialize the object content to.

Parameters:

  • str (String) (defaults to: '')

    the string to append this objects serialized

Returns:

  • (String)


38
39
40
# File 'lib/axlsx/workbook/worksheet/sheet_calc_pr.rb', line 38

def to_xml_string(str='')
  str << "<sheetCalcPr #{serialized_attributes}/>"
end