In this work we are interested in studying the effect of the heat treatments on the dopant segregation at the grain boundaries in the polycrystalline silicon films. The obtained results have shown that the heat treatments reduce the number of segregation sites at the grains boundaries, and consequently they limit the structural changes that can appear there and the quantity of the dope atoms that can accumulate in these boundaries. In addition they are more and more dopant that are found inside the grains when the temperature of the heat treatment increases. On the other hand, we established that the arsenic atoms have a strong tendency to the segregation than the boron atoms, and we have noticed a strong migration of arsenic atoms from the boundaries towards the grains under the effect of the heat treatments. It was also shown that the segregation of arsenic atoms at the grains boundaries is about 4 times higher than that of the boron atoms.