In Excel, if I get the margins error, In the layout tab set the "Size" to US Letter.

The dock can't be completely disabled because it's responsible for some background system stuff, but you can delay its appearance with:

defaults write autohide-delay -float 2; killall Dock

"-float 2" has units of seconds.

defaults delete autohide-delay && killall Dock

Sets the dock back to normal.