For two intermetallics, the results of experimental measurements of optical and magnetic properties together with calculations in the frame of the LSDA+U method are reported. The calculations of the electronic structure allow one to interpret the curves of optical conductivity extracted from direct experimental ellipsometry measurements of optical constants. A detailed analysis shows that, whereas experimental curves of the optical conductivity for both compounds are similar to each other, the contributions of various interband transitions are slightly different. Also band structure calculations give magnetic structure and values of magnetic moments for each ion in Sm2Fe17 and Tm2Fe17 as well as the total one in good agreement with experimental values if the orbital moment is taken into account. Obtained optical theoretical and experimental results demonstrate good agreement with each other for both intermetallics.