Class: Writexlsx::Worksheet::EmbedImageCellData
- 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
Attributes inherited from CellData
Instance Method Summary collapse
-
#initialize(image_index, xf) ⇒ EmbedImageCellData
constructor
A new instance of EmbedImageCellData.
- #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(image_index, xf) ⇒ EmbedImageCellData
Returns a new instance of EmbedImageCellData.
218 219 220 221 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 218 def initialize(image_index, xf) @image_index = image_index @xf = xf end |
Instance Method Details
#write_cell(worksheet, row, row_name, col) ⇒ Object
223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/write_xlsx/worksheet/cell_data.rb', line 223 def write_cell(worksheet, row, row_name, col) attributes = cell_attributes(worksheet, row, row_name, col) # Write a error value (mainly for embedded images). attributes << %w[t e] attributes << ['vm', @image_index] worksheet.writer.tag_elements('c', attributes) do worksheet.write_cell_value('#VALUE!') end end |