# File lib/spreadsheet/worksheet.rb, line 148
    def format_dates! format=nil
      each do |row|
        row.each_with_index do |value, idx|
          unless row.formats[idx] || row.format(idx).date_or_time?
            numfmt = case value
                     when DateTime, Time
                       format || client('DD.MM.YYYY hh:mm:ss', 'UTF-8')
                     when Date
                       format || client('DD.MM.YYYY', 'UTF-8')
                     end
            case numfmt
            when Format
              row.set_format idx, numfmt
            when String
              fmt = row.format(idx).dup
              fmt.number_format = numfmt
              row.set_format idx, fmt
            end
          end
        end
      end
    end