toDataURLAsync

Creates an Excel file that represents the current workbook and returns a Promise that is resolved with the data URL.

Returns

Promise - A promise that will be resolved with the Excel file as data URL.

Example

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          rows: [
              { cells: [ { value: "foo" } ] }
          ]
      }
  ]
});

workbook.toDataURLAsync().then(function(dataURL) {
    kendo.saveAs({
      dataURI: dataURL,
      fileName: "Test.xlsx"
    });
});

</script>
In this article