Lemma 70.6.3. Let $S$ be a scheme. Let $X$ be an algebraic space over $S$. Let $Z \subset X$ be a locally principal closed subspace. Let $U = X \setminus Z$. Then $U \to X$ is an affine morphism.

Proof. The question is étale local on $X$, see Morphisms of Spaces, Lemmas 66.20.3 and Lemma 70.6.2. Thus this follows from the case of schemes which is Divisors, Lemma 31.13.3. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).