[go: up one dir, main page]

Skip to content

Commit

Permalink
SB -- Boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
wantmys2000 committed Jul 29, 2014
1 parent b57782b commit 837a0a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dullard/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def rows
row << "" unless closed
closed = false

cell_type = :boolean if node.attributes['t'] == 'b'

if node.attributes['t'] != 's' && node.attributes['t'] != 'b'
cell_format_index = node.attributes['s'].to_i
cell_type = @workbook.format2type(@workbook.attribute2format(cell_format_index))
Expand Down Expand Up @@ -241,6 +243,8 @@ def rows
when :percentage # ? TODO
when :float
value = value.to_f
when :boolean
value = (value.to_i == 1) ? true : false
else
# leave as string
end
Expand Down

0 comments on commit 837a0a0

Please sign in to comment.