Aims. In this paper we report calculations for energy levels, radiative rates, and electron impact excitation rates for transitions in O vii. Methods. The grasp (general-purpose relativistic atomic structure package) is adopted for calculating energy levels and radiative rates. For determining the collision strengths and subsequently the excitation rates, the Dirac atomic R-matrix code (darc) and the flexible atomic code (fac) are used. Results. Oscillator strengths, radiative rates, and line strengths are reported for all E1, E2, M1, and M2 transitions among the lowest 49 levels of O vii. Collision strengths have been averaged over a Maxwellian velocity distribution, and the resulting effective collision strengths are reported over a wide temperature range below 2 × 10 6 K. Additionally, lifetimes are also listed for all levels.