We investigate the angular behavior of the upper bound of absorption provided by the guided modes in thin film solar cells. We show that the 4n limit can be potentially exceeded in a wide angular and wavelength range using two-dimensional periodic thin film structures. Two models are used to estimate the absorption enhancement; in the first one, we apply the periodicity condition along the thickness of the thin film structure but in the second one, we consider imperfect confinement of the wave to the device. To extract the guided modes, we use an automatized procedure which is established in this work. Through examples, we show that from the optical point of view, thin film structures have a high potential to be improved by changing their shape. Also, we discuss the nature of different optical resonances which can be potentially used to enhance light trapping in the solar cell. We investigate the two different polarization directions for one-dimensional gratings and we show that the transverse magnetic polarization can provide higher values of absorption enhancement. We also propose a way to reduce the angular dependence of the solar cell efficiency by the appropriate choice of periodic pattern. Finally, to get more practical values for the absorption enhancement, we consider the effect of parasitic loss which can significantly reduce the enhancement factor.