Method: WinExcel::ExcelFile.finalize
- Defined in:
- lib/winexcel/excel_file.rb
.finalize ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/winexcel/excel_file.rb', line 230 def self.finalize() if not @@automationInstance.nil? begin @@automationInstance.Workbooks.each do |wb| begin wb.Close(false) rescue end wb = nil end GC.start sleep(3) rescue end @@automationInstance.quit sleep 1 @@automationInstance = nil GC.start sleep(3) end end |