For the demand of line chromatic confocal displacement measurement, a new multi-channel compact spectrometer needs to be developed. In this paper, a microlens array-grating structure, in which one side is microlens array and the other side is blazed gating, is proposed for a miniature spectrometer. The microlens array-grating structure can be pressed in the form of "sandwich" by soft lithography using PDMS material. The micro lens array is a 10*10 mm square, consisting of 45*45 microlens elements, each with a diameter of 220 μm, and the outer diameters of the elements are closely connected with each other. The blazed grating is an equal period grating with a grating line density of 600 lines /mm and a blazed angle of 8°37’. By optimizing the design parameters, the image resolution of the spectrometer based on the grating-microlens array is within 1 nm in the wide band of 400 nm~700 nm. Different microlens grating surface elements have performance consistency with a standard deviation of about 0.5 nm, which can realize the function of arrayed micro-spectrometer.