diff options
Diffstat (limited to 'lib/roo/excelx')
| -rw-r--r-- | lib/roo/excelx/cell/number.rb | 2 | ||||
| -rw-r--r-- | lib/roo/excelx/comments.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/roo/excelx/cell/number.rb b/lib/roo/excelx/cell/number.rb index 5cd9b55..5cdec5e 100644 --- a/lib/roo/excelx/cell/number.rb +++ b/lib/roo/excelx/cell/number.rb @@ -51,7 +51,7 @@ module Roo when /^#,##0.(0+)$/ then number_format("%.#{$1.size}f") when '0%' proc do |number| - Kernel.format('%d%%', number.to_f * 100) + Kernel.format('%.0f%%', number.to_f * 100) end when '0.00%' proc do |number| diff --git a/lib/roo/excelx/comments.rb b/lib/roo/excelx/comments.rb index 65044a9..c37097a 100644 --- a/lib/roo/excelx/comments.rb +++ b/lib/roo/excelx/comments.rb @@ -13,7 +13,7 @@ module Roo return {} unless doc_exists? doc.xpath('//comments/commentList/comment').each_with_object({}) do |comment, hash| - value = (comment.at_xpath('./text/r/t') || comment.at_xpath('./text/t')).text + value = comment.xpath('./text/r/t', './text/t').text hash[::Roo::Utils.ref_to_key(comment['ref'].to_s)] = value end end |
