How do I stop my puppy from biting when he gets excited?

I’ve just been leaving the room if he starts biting, is this a good way to stop it?
13 answers 13