How to create custom export to excel button function

Hi Guruz,
I want to provide export data option via my custom button in grafana.
can anyone help for this concern. I dont want to use “Insepct” Option for export option.
plz guide