How to store the excel output of the table visualization stored at a file location?

Hi ,

I have a table visualization which i am exporting using a script on a button click event.

Instead of downloading the excel output, i want to store it on a file location . how can i achieve the same?