module RubyXL::LegacyCell

Attributes

formula[RW]
worksheet[RW]

Public Instance Methods

workbook() click to toggle source
# File lib/rubyXL/cell.rb, line 17
def workbook
  @worksheet.workbook
end

Private Instance Methods

get_cell_border() click to toggle source
# File lib/rubyXL/cell.rb, line 49
def get_cell_border
  workbook.borders[get_cell_xf.border_id]
end
get_cell_font() click to toggle source
# File lib/rubyXL/cell.rb, line 45
def get_cell_font
  workbook.fonts[get_cell_xf.font_id]
end
get_cell_xf() click to toggle source
# File lib/rubyXL/cell.rb, line 41
def get_cell_xf
  workbook.cell_xfs[self.style_index || 0]
end
validate_workbook() click to toggle source
# File lib/rubyXL/cell.rb, line 23
def validate_workbook()
  unless workbook.nil? || workbook.worksheets.nil?
    workbook.worksheets.each { |sheet|
      unless sheet.nil? || sheet.sheet_data.nil? || sheet.sheet_data[row].nil?
        if sheet.sheet_data[row][column] == self
          return
        end
      end
    }
  end
  raise "This cell #{self} is not in workbook #{workbook}"
end
validate_worksheet() click to toggle source
# File lib/rubyXL/cell.rb, line 36
def validate_worksheet()
  return if @worksheet && @worksheet[row] && @worksheet[row][column].equal?(self)
  raise "Cell #{self} is not in worksheet #{worksheet}"
end