  The electronic structure of epitaxial films on LaCoO3(LCO) has been studied
within first principle electronic structure calculations. A spin state
transition is found to take place as a function of lattice strain which freezes
in the intermediate spin state for non zero strain. In contrast to earlier
speculations this is found to arise from substrate strain alone and angle
variations are small. The intermediate spin state also stabilizes
ferromagnetism in the ground state. The anomalous temperature dependence of the
X-ray absorption spectra for films of LCO on LCO and its absence in films of
LCO on (LaAlO_{3})_{0.3}(SrAlTaO_{6})_{0.7}$(LSAT) is also explained.
