Role of giant resonance excitation in heavy ion collisions