Attosecond excitation of electron wavepackets