Laser Scanning Confocal SpectroMicroscope (LSCSM) is a system to acquire spectral mapping on a micro scale. The acquired data contains massive spatial and spectral information in the form of a three-dimensional data cube. Due to the large data size, efficiently processing of the data to extract critical information becomes an important issue. This work aims at developing a program to automatically decompose each spectrum into several components via constrained least-squares calculation. The constrained criteria includes spectral peak position, amplitude, and full width at half maximum (FWHM). The program provides an interface to allow user to interactively adjust the initial conditions and visualize the fitting results. As an example, we processed data from a spectral mapping of a 2D perovskite sample, which is an actively studied emergent material for solar cell applications. Processing the spectral data with the program developed allows visualization and a statistical analysis of the sample uniformity. This work demonstrates that the constrained least-squares decomposition can contribute to the analysis of massive spectral data.