As proposed by Ceperley and Bernu, the excited-state energies can be obtained from imaginary-time cross-correlation functions (rather than autocorrelation functions) generated by quantum Monte Carlo (QMC) simulations. We show that, when processed by the filter diagonalization method (FDM), the same cross-correlation functions yield excited-state energies of higher accuracy and greater stability. The reason is that unlike the other methods FDM uses all the time domain information available. The superior performance of the cross-correlation FDM is demonstrated for a two-dimensional harmonic oscillator with closely lying eigenvalues. Because QMC does not take advantage of the separability in the Hamiltonian, this model system provides a challenging and generic test case.