In situ measurements provide an opportunity for investigating not only the initial and final states of the process, but also intermediate states within the process. In particular, X-ray spectroscopy techniques have become an important tool to obtain relevant information (oxidation state, electronic structure, local bonding environment) during material's transformation under real reaction conditions. Herein, we describe a novel cell specifically designed for ex situ and in situ thermal studies with X-ray spectroscopy techniques. A key feature of this setup is the possibility to work at high temperatures (up to 1370 • C) and under different atmospheres (from inert to reactive). The cell is conveniently designed to allow measurements in in-house laboratories as well as large-scale synchrotron facilities. The setup allows also to perform X-ray spectroscopy measurements in both fluorescence and transmission mode. In order to demonstrate the capabilities of the designed cell, thermal oxidation of metallic titanium to titanium dioxide was studied. First, the manufactured cell was tested in the laboratory and ex situ X-ray photoelectron measurements were performed for the Ti metal discs heated at different temperatures. Then, the setup was mounted on SuperXAS beamline at Swiss Light Source, and Ti K-edge X-ray absorption spectroscopy and valence-to-core X-ray emission spectra were collected during the thermal oxidation process. The combination of these techniques provided information about the electronic structure of occupied and unoccupied states around the Fermi level.