Pega Excel file

How to get the Grid or table data on the screen in to the excel file?

@RajaTalla ,

Already same question is answered in below post. Could you please check.