lib/roo/excel.rb in roo-0.8.1 vs lib/roo/excel.rb in roo-0.8.2

- old
+ new

@@ -317,43 +317,9 @@ # ) end raise StandardError, "sheet '#{name}' not found" end - # writes csv output to stdout or file - def write_csv_content(file=nil,sheet=nil) - file = STDOUT unless file - sheet = @default_sheet unless sheet - worksheet = @workbook.worksheet(sheet_no(sheet)) - skip = 0 - worksheet.each(skip) { |row_par| - 1.upto(row_par.length) {|col| - file.print(",") if col > 1 - cell = row_par.at(col-1) - unless cell - empty = true - else - case cell.type - when :numeric - onecelltype = :float - onecell = cell.to_f - when :text - onecelltype = :string - onecell = cell.to_s('utf-8') - when :date - onecelltype = :date - onecell = cell.date - else - onecelltype = nil - onecell = nil - end - end - file.print one_cell_output(onecelltype,onecell,empty) - } - file.print("\n") - } - end - def empty_row?(row) content = false row.each {|elem| if elem != '' #if elem.class == String and elem.size > 0