72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/spreadsheet/excel/writer/workbook.rb', line 72
def complete_sst_update? workbook
stored = workbook.sst.collect do |entry| entry.content end
current = worksheets(workbook).inject [] do |memo, worksheet|
memo.concat worksheet.strings
end
total = current.size
current.uniq!
current.delete ''
if (stored - current).empty? && !stored.empty?
additions = current - stored
[:partial_update, total, stored + additions]
else
[:complete_update, total, current]
end
end
|