Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
handle percentages as floats
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Kaplan committed Jan 5, 2015
1 parent 577f8d6 commit eabe2db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/dullard/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Dullard::Workbook
'0.00' => :float,
'#,##0' => :float,
'#,##0.00' => :float,
'0%' => :percentage,
'0.00%' => :percentage,
'0%' => :float,
'0.00%' => :float,
'0.00E+00' => :float,
'# ?/?' => :float, #??? TODO:
'# ??/??' => :float, #??? TODO:
Expand Down Expand Up @@ -257,7 +257,6 @@ def rows
when :time
when :date
value = (Dullard::OOXMLEpoch + node.value.to_f)
when :percentage # ? TODO
when :float
value = node.value.to_f
else
Expand Down

0 comments on commit eabe2db

Please sign in to comment.