Download CSV of all pages of paginated table?

Can we add a custom action to the download data as csv button?