To add to Ted Shifrin's hint, one can actually show a stronger result via the invariance of domain theorem:
If $M$ is a compact $n$-manifold and $N$ is a connected $n$-manifold, then an embedding $h : M \to N$ must be surjective, hence a homeomorphism.
This is corollary 2B.4 in Hatcher's Algebraic Topology. To prove it, note that $h(M)$ must be closed since $M$ is compact and $N$ Hausdorff. $h(M)$ is also open by the invariance of domain. Since $N$ is connected, it follows that $h(M) = N$.
Your question now follows since $S^n$ and $\Bbb R^n$ are not homeomorphic.