Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. name: FileSaver minimal test
  2. description: Performs a basic Excel API call using plain JavaScript & Promises.
  3. host: EXCEL
  4. api_set: {}
  5. script:
  6. content: |-
  7. const blob = new Blob(["test"], { type: "application/octet-stream" });
  8. const reader = new FileReader();
  9. reader.onloadend = function () {
  10. const url = reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');
  11. location.href = url
  12. }
  13. reader.readAsDataURL(blob)
  14. language: typescript
  15. template:
  16. content: ''
  17. language: html
  18. style:
  19. content: ''
  20. language: css
  21. libraries: file-saver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement