Class: Java::OrgApachePoiHssfUsermodel::HSSFRow
- Inherits:
-
Object
- Object
- Java::OrgApachePoiHssfUsermodel::HSSFRow
show all
- Includes:
- Enumerable, RubyPoiTranslations
- Defined in:
- lib/datashift/applications/hssf_row_extensions.rb
Overview
Instance Method Summary
collapse
#cell_value, #poi_cell_type, #poi_cell_value
Instance Method Details
#[](column) ⇒ Object
33
34
35
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 33
def []( column)
cell_value( get_or_create_cell( column ) )
end
|
#[]=(column, value) ⇒ Object
37
38
39
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 37
def []=( column, value )
get_or_create_cell(column, value).setCellValue( poi_cell_value(value) )
end
|
#each(&_block) ⇒ Object
Iterate over each column in the row and yield on the cell
55
56
57
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 55
def each(&_block)
cellIterator.each { |c| yield cell_value(c) }
end
|
#empty? ⇒ Boolean
23
24
25
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 23
def empty?
getLastCellNum == -1
end
|
#get_or_create_cell(column, value = nil) ⇒ Object
41
42
43
44
45
46
47
48
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 41
def get_or_create_cell( column, value = nil )
ref = CellReference.new(getRowNum, column)
if value
getCell(ref.getCol) else
getCell(ref.getCol) end
end
|
#idx ⇒ Object
50
51
52
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 50
def idx
getRowNum
end
|
#size ⇒ Object
27
28
29
30
31
|
# File 'lib/datashift/applications/hssf_row_extensions.rb', line 27
def size
getPhysicalNumberOfCells end
|