Hi Anupama,
In MATLAB R2023b and beyond, for the line number to appear in the exported results, the analysis has to be run via Polyspace Bug Finder Server.
The export can be generated either with the "polyspace-results-export" executable of the Server product or on the "client" side from the desktop executable.
The important part is that the results are created / the analysis is carried out with the Server products / executables.
I hope this helps!