Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: FileSaver minimal test
- description: Performs a basic Excel API call using plain JavaScript & Promises.
- host: EXCEL
- api_set: {}
- script:
- content: |-
- const blob = new Blob(["test"], { type: "application/octet-stream" });
- const reader = new FileReader();
- reader.onloadend = function () {
- const url = reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');
- location.href = url
- }
- reader.readAsDataURL(blob)
- language: typescript
- template:
- content: ''
- language: html
- style:
- content: ''
- language: css
- libraries: file-saver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement