Saving CSV to blob in Javascript?

Saving CSV to blob in Javascript?

initialfreshinitialfresh Posts: 8Questions: 4Answers: 0

Using csvHtml5, Is it possible to save the file that is going to be exported to a javascript blob?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,815Questions: 1Answers: 10,517 Site admin
    Answer ✓

    Not with that button type (it uses a Blob itself which is then downloaded, but there is no way to stop it creating a download file from the Blob without changing the code).

    What I would suggest instead is using a custom button which will get the data to export (buttons.exportData()) and then just create the Blob with a simple new Blob() call.

    This example shows that principle to create a JSON export file.

    Allan

  • initialfreshinitialfresh Posts: 8Questions: 4Answers: 0

    Thank you!

This discussion has been closed.