The number of standard Young tableaux of a skew shape $\lambda/\mu$ can be computed as a sum over excited diagrams inside $\lambda$. Excited diagrams are in bijection with certain lozenge tilings, with flagged semistandard tableaux and also nonintersecting lattice paths inside $\lambda$. We give two new proofs of a multivariate generalization of this formula, which allow us to extend the setup beyond standard Young tableaux and the underlying Schur symmetric polynomials. The first proof uses multiple contour integrals. The second one interprets excited diagrams as configurations of a six-vertex model at a free fermion point, and derives the formula for the number of standard Young tableaux of a skew shape from the Yang-Baxter equation.