SHARE
TWEET

Untitled

a guest Apr 20th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top