Excitation energy dependence of the photoemission spectra of metals