xls_porter 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/xls_porter.rb +4 -3
- metadata +1 -1
data/lib/xls_porter.rb
CHANGED
@@ -56,11 +56,11 @@ module XlsPorter
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
(0..(columns.size - 1)).each do |i|
|
59
|
+
column = columns[i]
|
59
60
|
value = row[i]
|
61
|
+
puts "Column: #{column} Value: #{value.inspect}"
|
60
62
|
value = value.strip if value.is_a?(String)
|
61
|
-
value =
|
62
|
-
column = columns[i]
|
63
|
-
puts "Column: #{column} Value: #{value}"
|
63
|
+
value = value.value if value.is_a?(Spreadsheet::Formula)
|
64
64
|
if column == "id" and update == "new"
|
65
65
|
record[column] = value
|
66
66
|
elsif ignore_columns.include?(column)
|
@@ -70,6 +70,7 @@ module XlsPorter
|
|
70
70
|
elsif [DateTime, Time, Date].include?(value.class)
|
71
71
|
record[column] = value if record[column].to_f != value.to_f
|
72
72
|
else
|
73
|
+
puts "Column: #{column} Record: #{record[column].to_s} Value: #{value.to_s}"
|
73
74
|
if record[column] != value
|
74
75
|
record[column] = value
|
75
76
|
update = "updated" if update == "exist"
|