I have a web page which shows some data.
I would like to give the user the ability to export that data they see as CSV files or PDF files or other formats.
is it technically possible to do so purely by javascript ?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To a certain extent this can be resolved:
here is a link which triggers a ‘save as’ download:
so the trick is to use data:application/octet-stream;
note however that it is not possible to specify the extension of the filename/resource you would save (e.g. report.csv)