New to Kendo UI for jQuery? Start a free 30-day trial
Removing PDF Export Option from Spreadsheet
Updated on Jan 26, 2026
Environment
| Product | Kendo UI for jQuery Spreadsheet |
| Version | 2025.4.1217 |
Description
I want to remove the PDF export option from the export popup in Spreadsheet in Kendo UI. How can I achieve this?
Solution
To remove the PDF export option from the Spreadsheet in Kendo UI, 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 file format DropDownList in the visible export window and remove the last item (PDF) from its dataSource.
-
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="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "Food Order",
mergedCells: [
"A1:G1"
],
rows: [{
height: 70,
cells: [{
value: "My Company", fontSize: 32, textAlign: "center"
}]
}],
}],
excel: {
fileName: "Order.xlsx"
}
});
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.exportCleanup");
exportButton.bind("click", () => {
const ddl = $(".k-window:visible").find("select.k-file-format").map(function () {
return $(this).data("kendoDropDownList");
}).get(0);
const dataSource = ddl.dataSource;
const data = dataSource.data();
if (data.length) {
dataSource.remove(data[data.length - 1]);
}
});
});
</script>