Thermal expansion of Co-containing invar alloys of GX1Ni29-Co17 ${\mathrm{Fe}}_{54}{\mathrm{Co}}_{17}{\mathrm{Ni}}_{29}$ and stainless invar ${\mathrm{Fe}}_{39}{\mathrm{Co}}_{50}{\mathrm{Cr}}_{9}{\mathrm{Ni}}_{2}$ was investigated from the viewpoint of local structure by analyzing temperature-dependent extended x-ray absorption fine-structure (EXAFS) spectra combined with the computational simulations based on the path-integral effective classical potential (PIECP) method. For detailed comparative discussion, FeNi invar alloys of 36invar, 42invar, and 45invar were also examined. It is found by EXAFS that in stainless invar, Co exhibits a noticeable invar effect, while the invar effect on Co in GX1Ni29-Co17 is negligibly small. The PIECP simulations provide qualitative agreement with this finding, exemplifying that the Co magnetization is more effectively suppressed in stainless invar with a temperature rise, because of a smaller lattice constant and shorter corresponding interatomic distances. The present study clearly demonstrates the importance of the local structural point of view to understand the detailed low thermal expansion mechanism, in which microscopic local thermal expansion often meaningfully differs from macroscopic lattice thermal expansion.