  We derive the Bethe ansatz equations describing the complete spectrum of the
transition matrix of the partially asymmetric exclusion process with the most
general open boundary conditions. By analysing these equations in detail for
the cases of totally asymmetric and symmetric diffusion, we calculate the
finite-size scaling of the spectral gap, which characterizes the approach to
stationarity at large times. In the totally asymmetric case we observe boundary
induced crossovers between massive, diffusive and KPZ scaling regimes. We
further study higher excitations, and demonstrate the absence of oscillatory
behaviour at large times on the ``coexistence line'', which separates the
massive low and high density phases. In the maximum current phase, oscillations
are present on the KPZ scale $t\propto L^{-3/2}$. While independent of the
boundary parameters, the spectral gap as well as the oscillation frequency in
the maximum current phase have different values compared to the totally
asymmetric exclusion process with periodic boundary conditions. We discuss a
possible interpretation of our results in terms of an effective domain wall
theory.
