The electronic structure of single-crystal WO3 and Na0.67WO3 (a sodium-tungsten bronze) has been measured using soft x-ray absorption and resonant soft x-ray emission oxygen K-edge spectroscopies. The spectral features show clear differences in energy and intensity between WO3 and Na0.67WO3. The x-ray emission spectrum of metallic Na0.67WO3 terminates in a distinct Fermi edge. The rigid-band model fails to explain the electronic structure of Na0.67WO3 in terms of a simple addition of electrons to the conduction band of WO3. Instead, Na bonding and Na 3s-O 2p hybridization need to be considered for the sodium-tungsten bronze, along with occupation of the bottom of the conduction band. Furthermore, the anisotropy in the band structure of monoclinic γ-WO3 revealed by the experimental spectra with orbital-resolved geometry is explained via density functional theory calculations. For γ-WO3 itself, good agreement is found between the experimental O K-edge spectra and the theoretical partial density of states of O 2p orbitals. Indirect and direct bandgaps of insulating WO3 are determined from extrapolating separations between spectral leading edges and accounting for the core-hole energy shift in the absorption process. The O 2p non-bonding states show upward band dispersion as a function of incident photon energy for both compounds, which is explained using the calculated band structure and experimental geometry.