Class: Writexlsx::Worksheet::FormulaArrayCellData
- Defined in:
- lib/write_xlsx/worksheet/cell_data.rb
Overview
:nodoc:
Constant Summary
Constants included from Constants
Constants::COL_MAX, Constants::ROW_MAX, Constants::SHEETNAME_MAX, Constants::STR_MAX
Constants included from Utility::Common
Utility::Common::PERL_TRUE_VALUES
Instance Attribute Summary collapse
-
#link_type ⇒ Object
readonly
Returns the value of attribute link_type.
-
#range ⇒ Object
readonly
Returns the value of attribute range.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from CellData
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(formula, xf, range, result) ⇒ FormulaArrayCellData
constructor
A new instance of FormulaArrayCellData.
- #write_cell(worksheet, row, row_name, col) ⇒ Object
Methods inherited from CellData
#cell_attributes, #display_url_string?
Methods included from Utility::CellReference
#row_col_notation, #substitute_cellref, #xl_cell_to_rowcol, #xl_col_to_name, #xl_range, #xl_range_formula, #xl_rowcol_to_cell
Methods included from Utility::Common
#absolute_char, #check_parameter, #float_to_str, #ptrue?, #put_deprecate_message
Constructor Details
#initialize(formula, xf, range, result) ⇒ FormulaArrayCellData
Returns a new instance of FormulaArrayCellData.
136 137 138 139 140 141 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 136 def initialize(formula, xf, range, result) @token = formula @xf = xf @range = range @result = result end |
Instance Attribute Details
#link_type ⇒ Object (readonly)
Returns the value of attribute link_type.
134 135 136 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 134 def link_type @link_type end |
#range ⇒ Object (readonly)
Returns the value of attribute range.
134 135 136 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 134 def range @range end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
134 135 136 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 134 def result @result end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
134 135 136 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 134 def token @token end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
134 135 136 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 134 def url @url end |
Instance Method Details
#data ⇒ Object
143 144 145 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 143 def data @result || 0 end |
#write_cell(worksheet, row, row_name, col) ⇒ Object
147 148 149 150 151 152 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 147 def write_cell(worksheet, row, row_name, col) worksheet.writer.tag_elements('c', cell_attributes(worksheet, row, row_name, col)) do worksheet.write_cell_array_formula(token, range) worksheet.write_cell_value(result) end end |