We present a method to obtain diffraction limited spectrograms of two- dimensional extended objects from a series of ground-based slit- spectrograms. The method is a combination of differential speckle interferometry and a rapid spectrograph scanning scheme. The slit of a spectrograph is scanned over the solar surface while simultaneous images of the reflective slit plate (slit-jaw images) and spectrograms are recorded with an exposure time that is short with respect to seeing-induced variations. A Knox- Thompson speckle reconstruction scheme is applied to the slit jaw images. From the individual slit- jaw images and the speckle reconstruction the instantaneous point spread function can be determined for any location along the slit. The recorded spectrograms can then be restored with the inverted linear operator that describes the formation of the spectrograms. The method has been applied to observations of the quiet solar granulation.