In this study, a method for optical simulation of external quantum efficiency (EQE) spectra of solar cells based on spectroscopy is proposed, which is based on the tested transmittance and reflectance spectra. First, to obtain a more accurate information of refractive index and extinction coefficient values, we modified the reported optical constants from the measured reflectance and transmittance spectra. The obtained optical constants of each layer were then collected to simulate the EQE spectra of the device. This method provides a simple, accurate and versatile way to obtain the actual optical constants of different layers. The EQE simulation approach was applied to the flat and textured heterojunctions with intrinsic layers (HIT) solar cells, respectively, which showed a perfect matching between the calculation results and the experimental data. Furthermore, the specific optical losses in different devices were analyzed.