lib/rbbt/tsv/excel.rb in rbbt-util-5.15.1 vs lib/rbbt/tsv/excel.rb in rbbt-util-5.15.2

- old
+ new

@@ -83,9 +83,24 @@ else cells.push v end end + cells = cells.collect do |v| + case v + when Float + v.to_s.sub(/e(-?\d+)$/,'E\1') + when String + if v =~ /^-?[\d\.]+e(-?\d+)$/ + v.sub(/e(-?\d+)$/,'E\1') + else + v + end + else + v + end + end + sheet1.row(i).concat cells i += 1 end book.write filename end