Theoretical study of K -shell excitations in formaldehyde