Export content of table to csv during zoom in 9.40

1) I have vj, where a table displays the content of the data.

2) I want to export the when i click on zoom button or on vj.

3) So the contents in table in the vj gets exported to a csv file and get's downloaed to my downloads folder.

Any easy option to do this. us.dump.delimted doesn't work, as i'm not exporting from a table, i have a first value in a array for one column and so on, so typically i want to export the table.