Sunspot cycle and associated variation of the solar spectral irradiance