It's one of those rules-to-be-broken-if-you-know-how-to rules, and I think the "how to" depends largely on POV and voice. Myself, I would not use "!" in 3rd-person omniscient (to me a largely neutral voice); or in 3rd objective (what some call "3rd distant"). How-some-ever, in 3rd subjective where a character's voice has been been established as, say, "excitable", it could work in, say, interior monologue. Likewise, in 1st, where pretty much anything goes.
Where it never works is when used to impart emphasis to a sentence that's DOA to begin with.
Great question!... Glad you asked!