Edit this page

Sheets

To create multiple sheets in an Excel workbook, use the sheets option, as demonstrated in the example below. Every item from that array represents a new sheet with its own rows and cells.

Example
<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
    {
      columns: [
        { autoWidth: true },
        { autoWidth: true }
      ],
      title: "Customers",
      rows: [
        {
          cells: [
            { value: "Company Name" },
            { value: "Contact" }
          ]
        },
        {
          cells: [
            { value: "Around the Horn" },
            { value: "Thomas Hardy" }
          ]
        },
        {
          cells: [
            { value: "B's Beverages" },
            { value: "Victoria Ashworth" }
          ]
        }
      ]
    },
    {
      title: "Employees",
      columns: [
        { autoWidth: true },
        { autoWidth: true }
      ],
      rows: [
        {
          cells: [
            { value: "First Name" },
            { value: "Last Name" }
          ]
        },
        {
          cells: [
            { value: "Andrew" },
            { value: "Fuller" }
          ]
        },
        {
          cells: [
            { value: "Nancy" },
            { value: "Davolio" }
          ]
        }
      ]
    }
  ]
});
kendo.saveAs({
    dataURI: workbook.toDataURL(),
    fileName: "Test.xlsx"
});
</script>

See Also

Articles on the Excel export functionality in Kendo UI:

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy