toDataURL

Creates an Excel file that represents the current workbook and returns it as a data URL.

The toDataURL method supports only JSZip 2.x versions. To use JSZip 3.x versions, call the toDataURLAsync method instead.

Returns

String - the Excel file as data URL.

Example

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          rows: [
              { cells: [ { value: "foo" } ] }
          ]
      }
  ]
});
var dataURL = workbook.toDataURL();
kendo.saveAs({
  dataURI: dataURL,
  fileName: "Test.xlsx"
});
</script>
In this article
Not finding the help you need? Improve this article