Spectroscopic studies of extended astronomical sources at optical wavelengths are hampered by the two-dimensional nature of current photon detectors. Most photons of interest are not utilized because a spectrometer must scan in the spatial or spectral domain. We present the first solar spectrum recorded with a three-dimensional, highly wavelength-sensitive photon detector based on a dye-doped polymer film at 1.6K. The achieved spectral resolution is comparable to the best solar spectra obtained with a Fourier transform spectrometer. Our experiment paves the way for a photon detector that improves the efficiency of spectroscopy of extended sources by orders of magnitudes.