Sheets
To create multiple sheets in an Excel workbook, use the sheets
option.
Every item from that array represents a new sheet with its own rows and cells.
<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>