Partition of excitation energy in peripheral heavy-ion reactions