Class: Writexlsx::Worksheet::CellData
- Inherits:
-
Object
- Object
- Writexlsx::Worksheet::CellData
- Includes:
- Utility::CellReference, Utility::Common
- Defined in:
- lib/write_xlsx/worksheet/cell_data.rb
Overview
:nodoc:
Direct Known Subclasses
BlankCellData, BooleanCellData, DynamicFormulaArrayCellData, EmbedImageCellData, FormulaArrayCellData, FormulaCellData, NumberCellData, StringCellData
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
-
#xf ⇒ Object
readonly
Returns the value of attribute xf.
Instance Method Summary collapse
-
#cell_attributes(worksheet, row, row_name, col) ⇒ Object
attributes for the
element. | - #display_url_string? ⇒ Boolean
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
Instance Attribute Details
#xf ⇒ Object (readonly)
Returns the value of attribute xf.
13 14 15 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 13 def xf @xf end |
Instance Method Details
#cell_attributes(worksheet, row, row_name, col) ⇒ Object
attributes for the
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 19 def cell_attributes(worksheet, row, row_name, col) # :nodoc: xf_index = xf ? xf.get_xf_index : 0 attributes = [ ['r', xl_rowcol_to_cell(row_name, col)] ] # Add the cell format index. if xf_index != 0 attributes << ['s', xf_index] elsif worksheet.set_rows[row] && worksheet.set_rows[row][1] row_xf = worksheet.set_rows[row][1] attributes << ['s', row_xf.get_xf_index] elsif worksheet.col_info[col] && worksheet.col_info[col].format col_xf = worksheet.col_info[col].format attributes << ['s', col_xf.get_xf_index] end attributes end |
#display_url_string? ⇒ Boolean
38 39 40 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 38 def display_url_string? true end |