We report O K-edge and Cu L 2 3 -edge X-ray-absorption near-edge-structure (XANES) spectra of oxycarbonate (Tl 0 . 8 Cr 0 . 2 )Sr 4 Cu 2 (CO 3 )O 7 obtained using a bulk-sensitive X-ray fluorescence yield technique. The prominent features of the O 1s absorption edge in the (Tl 0 . 8 Cr 0 . 2 )Sr 4 Cu 2 (CO 3 )O 7 compound are three distinct pre-edge peaks at 528.2, 529.3 and 530.5 eV, respectively. We ascribed these pre-edge peaks to excitations of O 1s electrons to predominant O 2p holes located in the CuO 2 planes, in the apical oxygen sites, and in the (Tl,Cr)-O planes, respectively. The average number of holes within the in-plane oxygen sites per CuO 2 sheet is approximately the same for both the (Tl 0 . 8 Cr 0 . 2 )Sr 4 Cu 2 (CO 3 )O 7 acid Tl 3 (CrO 4 )Sr 8 Cu 4 O 1 6 systems. Conversely, the average hole content in the apical oxygen sites decreases significantly in (Tl 0 . 8 Cr 0 . 2 )Sr 4 Cu 2 (CO 3 )O 7 as compared to Tl 3 (CrO 4 )Sr 8 Cu 4 O 1 6 . The reduction of the average hole concentration in the apical oxygen sites is accompanied by the enhanced superconductivity in (Tl 0 . 8 Cr 0 . 2 )Sr 4 Cu 2 (CO3)O7, indicating that the O 2p holes on the apical oxygen sites play an important role to control the T c . The behavior of the high-energy shoulders in the Cu L 2 3 -edge absorption spectra coincides with that of the pre-edge peak at 528.2 eV in the O K-edge absorption spectra.