Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/samhowley/roo into samhow…
Browse files Browse the repository at this point in the history
…ley-master
  • Loading branch information
stevendaniels committed May 28, 2015
2 parents 67381a6 + ea40775 commit d0f3e08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/roo/base.rb
Expand Up @@ -683,9 +683,9 @@ def cell_to_csv(row, col, sheet)

case celltype(row, col, sheet)
when :string
%("#{onecell.tr('"', '""')}") unless onecell.empty?
%("#{onecell.gsub('"', '""')}") unless onecell.empty?
when :boolean
%("#{onecell.tr('"', '""').downcase}")
%("#{onecell.gsub('"', '""').downcase}")
when :float, :percentage
if onecell == onecell.to_i
onecell.to_i.to_s
Expand All @@ -695,7 +695,7 @@ def cell_to_csv(row, col, sheet)
when :formula
case onecell
when String
%("#{onecell.tr('"', '""')}") unless onecell.empty?
%("#{onecell.gsub('"', '""')}") unless onecell.empty?
when Float
if onecell == onecell.to_i
onecell.to_i.to_s
Expand All @@ -712,7 +712,7 @@ def cell_to_csv(row, col, sheet)
when :time
integer_to_timestring(onecell)
when :link
%("#{onecell.url.tr('"', '""')}")
%("#{onecell.url.gsub('"', '""')}")
else
fail "unhandled celltype #{celltype(row, col, sheet)}"
end || ''
Expand Down

0 comments on commit d0f3e08

Please sign in to comment.