excel = luacom.GetObject("Excel.Application") if excel == nil then print("Error! Could not get object!") end