class Workbook
	def self.with_path(workbookPath)
		begin
			@app = WIN32OLE.new("Excel.Application")
			@app.DisplayAlerts = false
			@workbook = @app.Workbooks.Open(workbookPath)
			yield @workbook
		ensure
			@workbook = nil
			System::GC.Collect
			System::GC.WaitForPendingFinalizers
			@app.Quit if @app
		end
	end
end