Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. try {
  2. //const fileblob = new Blob([text], { type: 'text/plain' });
  3. var zip = new JSZip();
  4. //zip.file(pgrange.values[0][0], fileblob);
  5. zip.file("Hello.txt", "Hello Worldn");
  6. var zippromise = zip.generateAsync({ type: "nodebuffer" });
  7. OfficeHelpers.UI.notify("hello all");
  8. zippromise.then(function () {
  9. OfficeHelpers.UI.notify("success")
  10. // FileSaver.saveAs(content, "example.zip");
  11. }).catch((error) => {
  12. OfficeHelpers.UI.notify(error)
  13. });
  14. } catch (err) {
  15. OfficeHelpers.UI.notify(err)
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement