New to Kendo UI for jQuery? Start a free 30-day trial
Change Default Workbook Name in Spreadsheet Export Dialog
Updated on Jan 26, 2026
Environment
Environment
| Product | Kendo UI for jQuery Spreadsheet |
| Version | 2025.4.1217 |
Description
How can I change the default filename of the workbook which appears in the Export dialog of the Spreadsheet?
Solution
To change the default workbook name in the Spreadsheet export dialog, follow these steps:
-
Get a reference to the Spreadsheet Menu and bind to its
selectevent. -
When the File menu is selected, attach a click handler to the Export button.
-
In the Export button click handler, locate the filename input in the visible export window and set its value.
-
Use
unbindbefore binding to prevent multiple event handlers if the File menu is opened repeatedly.
Below is a runnable example that demonstrates the approach:
<div id="example">
<div id="spreadsheet"></div>
</div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "Food Order",
mergedCells: [
"A1:G1"
],
rows: [{
height: 70,
cells: [{
value: "My Company", fontSize: 32, textAlign: "center"
}]
}],
}]
});
const spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
const menu = spreadsheet.element.find("div.k-menu").data("kendoMenu");
menu.bind("select", (e) => {
const isFileMenu = $(e.item).find(".k-menu-link-text").text() === "File";
if (!isFileMenu) {
return;
}
const exportButton = $("button[title='Export...']").data("kendoButton");
// prevent multiple bindings if File is opened more than once
exportButton.unbind("click.exportNameChange");
exportButton.bind("click.exportNameChange", () => {
const exportWindow = $(".k-window:visible");
// Find the file name input and set custom value
const fileNameInput = exportWindow.find("input.k-textbox, input[data-bind='value: name']").first();
fileNameInput.val("MyCustomWorkbookName");
});
});
</script>