A common question after water damage in a home is whether the hardwood floors can be saved and the answer depends on several factors. The first consideration is how much water went on your floors and how long was the flooring exposed to the water? The second factor is what kind of "hardwood" floor do you have or is it actually a laminate floor that looks like hardwood?
Generally speaking, laminate floors cannot be saved as water underneath the actual floor is difficult to dry quickly before mold begins to grow. Laminate is moderately water-resistant but not waterproof. While the top layer can theoretically provide a waterproof shield, once the water penetrates to the lower layers it will swell up and then not shrink back down, making replacement necessary. Engineered floors have a thin layer of real wood on the surface, allowing for possible minor sanding and refinishing.
Real hardwood floors have the best possibility of being sanded and refinished, depending upon the thickness of the floors. If the floor planks are "cupped" as shown in the photo, if only very minor cupping then sometimes the floors will "relax" back after a few weeks but may not completely go away and then they can be sanded and refinished. If floors can be sanded and refinished, then the entire floor area needs to be done, not just the affected area, as color and finish sheen are impossible to exactly match.
Before any repair is begun though, make sure the underlying water problem is permanently corrected and that all flooring not removed is completely dry. Hiring a professional to dry the area correctly insures that excess moisture is removed, making for a successful restoration. So if your floors have only minor water damage then sanding and refinishing may be an option but if floors sustain major water damage then replacement is generally the only option.