Spherical harmonic Lattice Sums for Gratings