One method for welding includes obtaining a heat-exchanger tube having an outward fold. The tube is inserted at least partially through the orifice of a tubesheet with the fold contacting one of the outward and inward facing sides of the tubesheet. A first electrode is positioned in contact with the outward fold and a second electrode in contact with the one side of the tubesheet. Another method for welding includes obtaining a heat-exchanger tube having a tube end. The tube is inserted at least partially through the orifice of a tubesheet. A first electrode is positioned in contact with the first tube end and a second electrode is positioned in contact with one of the outward and inward facing sides of the tubesheet. The first electrode is moved against the first tube end to create an outward fold with the outward fold contacting the one side of the tubesheet.