Last active
April 11, 2019 00:40
-
-
Save MakotoE/b91ddfc877dfd0d9e8015c578882f6ee to your computer and use it in GitHub Desktop.
Performs a basic Excel API call using plain JavaScript & Promises.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment