build csv and use data uri for download.