lib/sycsvpro/spread_sheet.rb
def equalize_rows(rows)
        column_sizes = rows.collect { |r| r.size }

        return rows if column_sizes.uniq.size == 1

        max_size = column_sizes.max
        small_rows = []
        column_sizes.each_with_index { |c,i| small_rows << i if c < max_size }

        small_rows.each do |i| 
          rows[i] += [NotAvailable] * (max_size - rows[i].size)
        end

        rows
      end
def equalize_rows(rows)
        column_sizes = rows.collect { |r| r.size }

        return rows if column_sizes.uniq.size == 1

        max_size = column_sizes.max
        small_rows = []
        column_sizes.each_with_index { |c,i| small_rows << i if c < max_size }

        small_rows.each do |i| 
          rows[i] += [NotAvailable] * (max_size - rows[i].size)
        end

        rows
      end
def equalize_rows ( rows ) column_sizes = rows . collect { | r | r . size } return rows if column_sizes . uniq . size == 1 max_size = column_sizes . max small_rows = [ ] column_sizes . each_with_index { | c , i | small_rows << i if c < max_size } small_rows . each do | i | rows [ i ] += [ NotAvailable ] * ( max_size - rows [ i ] . size ) end rows end
If rows are of different column size the rows are equalized in column
 size by filling missing columns with NA
If rows are of different column size the rows are equalized in column size by filling missing columns with NA