Skip to content

Commit

Permalink
Merge pull request #6 from ivarsb/percentages
Browse files Browse the repository at this point in the history
Do not divide percentage by 100.
  • Loading branch information
ebeigarts committed Apr 8, 2015
2 parents b6117b2 + 28543bd commit d255edd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/saxlsx/rows_collection_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ def value_of(text)
DateTime.new(date.year, date.month, date.day, date.hour, date.minute, date.second)
when :fixnum
text.to_i
when :float
when :float, :percentage
text.to_f
when :bignum
BigDecimal.new(text)
when :percentage
text.to_f / 100
else
if @current_type == 'n'
text.to_f
Expand Down Expand Up @@ -150,4 +148,4 @@ def detect_custom_format_type(code)
end
end
end
end
end

0 comments on commit d255edd

Please sign in to comment.