Hi Sathish,
as far as I know it is not possible to display only the used rows & columns in the Spreadsheet component. The behavior is quite similar to excel.
In my opinion, the spreadsheet is only for planning scenarios or simpler reporting scenarios because it lacks some important options (no selection possible, no header scrolling, etc.) .
Best regards,
Michael