Class: Excel::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/ru_excel/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(indx, parent_sheet) ⇒ Column

Returns a new instance of Column.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ru_excel/column.rb', line 7

def initialize(indx, parent_sheet)
    @index = indx
    @parent = parent_sheet
    @parent_wb = parent_sheet.parent
    @xf_index = 0x0F
    
    @width = 0x0B92
    @hidden = 0
    @level = 0
    @collapse = 0
end

Instance Attribute Details

#collapseObject

Returns the value of attribute collapse.



18
19
20
# File 'lib/ru_excel/column.rb', line 18

def collapse
  @collapse
end

#hiddenObject

Returns the value of attribute hidden.



18
19
20
# File 'lib/ru_excel/column.rb', line 18

def hidden
  @hidden
end

#levelObject

Returns the value of attribute level.



18
19
20
# File 'lib/ru_excel/column.rb', line 18

def level
  @level
end

#widthObject

Returns the value of attribute width.



18
19
20
# File 'lib/ru_excel/column.rb', line 18

def width
  @width
end

Instance Method Details

#get_biff_recordObject



21
22
23
24
25
26
27
# File 'lib/ru_excel/column.rb', line 21

def get_biff_record
    options =  (@hidden & 0x01) << 0
    options |= (@level & 0x07) << 8
    options |= (@collapse & 0x01) << 12
    
    BiffRecord.colInfoRecord(@index, @index, @width, @xf_index, options)
end