Multichannel grating spectrometer for millimeter waves