"I can't help it"

Could someone please help me translate this English phrase into Spanish, if at all possible? The phrase I wish to translate is "I can't help it", as is used in English for an excuse for doing something. eg,

Context:

A "Will you stop eating that cake!"
B " I can't help it, it's so delicious!"

or

A "You're swearing so much lately"
B "I'm sorry but I can't help it - I work with men who swear all day!"

Literally I think it would be "no puedo ayudarlo", but would this have the same meaning in Spanish?