Created
February 27, 2018 09:37
-
-
Save aonrobot/964f1bda5f5f89c616156866107a03d6 to your computer and use it in GitHub Desktop.
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
function exportXLSX(blob){ | |
if (typeof window.navigator.msSaveBlob === 'function') { | |
window.navigator.msSaveBlob(blob, "export-" + new Date().getTime() + ".xlsx"); | |
} else { | |
var link = document.createElement('a'); | |
link.href = window.URL.createObjectURL(blob); | |
link.download = "export-" + new Date().getTime() + ".xlsx"; | |
document.body.appendChild(link); | |
link.click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment