K-shell photoionization and electron impact excitation of Fe XVII–Fe XXIII