From 28543bd375d68bf4a6a5d0cf45ce085a7afb711b Mon Sep 17 00:00:00 2001 From: Ivars Belovs Date: Tue, 7 Apr 2015 16:42:38 +0300 Subject: [PATCH] Do not divide percentage by 100. --- lib/saxlsx/rows_collection_parser.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/saxlsx/rows_collection_parser.rb b/lib/saxlsx/rows_collection_parser.rb index 240e933..48c78c5 100644 --- a/lib/saxlsx/rows_collection_parser.rb +++ b/lib/saxlsx/rows_collection_parser.rb @@ -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 @@ -150,4 +148,4 @@ def detect_custom_format_type(code) end end end -end \ No newline at end of file +end