sheets.filterObject(default: null)

The configuration of the Excel auto-filter. When set, the final document will be have auto-filtering enabled.

Example - enabling filtering

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          filter: { from: 0, to: 1 },
          rows: [
            { cells: [ { value: "First Name" }, { value: "Last Name" } ] },
            { cells: [ { value: "John" }, { value: "Doe" } ] },
            { cells: [ { value: "Jane" }, { value: "Doe" } ] }
          ]
      }
  ]
});
workbook.toDataURLAsync().then(function(dataURL) {
  kendo.saveAs({
    dataURI: dataURL,
    fileName: "Test.xlsx"
  });
});
</script>

sheets.filter.fromNumber

The index of the first filterable column.

Example

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          filter: {
              from: 1,
              to: 3
          },
          rows: [
              { cells: [ 
                  { value: "ID" }, 
                  { value: "Name" }, 
                  { value: "Category" }, 
                  { value: "Price" } 
              ] },
              { cells: [ 
                  { value: 1 }, 
                  { value: "Product A" }, 
                  { value: "Electronics" }, 
                  { value: 100 } 
              ] }
          ]
      }
  ]
});

workbook.toDataURLAsync().then(function(dataURL) {
  kendo.saveAs({
    dataURI: dataURL,
    fileName: "filter-from-example.xlsx"
  });
});
</script>

sheets.filter.toNumber

The index of the last filterable column.

Example

<script>
var workbook = new kendo.ooxml.Workbook({
  sheets: [
      {
          filter: {
              from: 0,
              to: 2
          },
          rows: [
              { cells: [ 
                  { value: "Product" }, 
                  { value: "Quantity" }, 
                  { value: "Total" }, 
                  { value: "Notes" } 
              ] },
              { cells: [ 
                  { value: "Laptop" }, 
                  { value: 5 }, 
                  { value: 5000 }, 
                  { value: "In stock" } 
              ] }
          ]
      }
  ]
});

workbook.toDataURLAsync().then(function(dataURL) {
  kendo.saveAs({
    dataURI: dataURL,
    fileName: "filter-to-example.xlsx"
  });
});
</script>