New to Kendo UI for jQuery? Start a free 30-day trial

Customize the Excel Export Filename of the Grid by Adding Current Date and Time

Updated on Sep 8, 2026

Environment

ProductProgress® Kendo UI® Grid for jQuery

Description

How can I add the current date and time to the Excel export filename of the Grid?

Solution

  1. Use the excelExport event which has the workbook in its event data to rename it.

  2. With the help of the kendo.toString() method or another way to format the date, concatenate the date to the filename:

    js
    excelExport: function(e) {
      e.workbook.fileName = kendo.toString(new Date, "d") + " Grid.xlsx";
    }
Example
View Source
    <div id="grid"></div>
    <script>
    $("#grid").kendoGrid({
      toolbar: ["excel"],
      columns: [
        { field: "name" }
      ],
      dataSource: [
        { name: "Jane Doe"},
        { name: "John Doe"}
      ],
      excelExport: function(e) {
        e.workbook.fileName = kendo.toString(new Date, "dd/MM/yyyy HH:mm") + " Grid.xlsx";
      }
    });
    var grid = $("#grid").data("kendoGrid");
    grid.saveAsExcel();
    </script>
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support