Class: OpenXML::SpreadsheetML::MergeCell
- Inherits:
-
Struct
- Object
- Struct
- OpenXML::SpreadsheetML::MergeCell
- Defined in:
- lib/xlsx/sheet.rb,
lib/xlsx/sheet.rb
Instance Attribute Summary collapse
-
#range ⇒ Object
Returns the value of attribute range.
Instance Method Summary collapse
Instance Attribute Details
#range ⇒ Object
Returns the value of attribute range
3 4 5 |
# File 'lib/xlsx/sheet.rb', line 3 def range @range end |
Instance Method Details
#include?(index) ⇒ Boolean
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/xlsx/sheet.rb', line 149 def include? index /([A-Z]+)(\d+):([A-Z]+)(\d+)/.match(self.range) col_span = ($1..$3) row_span = ($2..$4) /([A-Z]+)(\d+)/.match(index) col = $1 row = $2 return true if col_span.include?(col) && row_span.include?(row) false end |
#top_left ⇒ Object
160 161 162 |
# File 'lib/xlsx/sheet.rb', line 160 def top_left self.range.split(/:/)[0] end |