New to Kendo UI for jQueryStart a free 30-day trial

Excel Export Customization

Updated on Jan 23, 2026

The Grid provides extensive Excel export customization capabilities that allow you to modify the appearance, structure, and content of the exported files to meet specific business requirements.

This article demonstrates how to customize various aspects of the Excel export, including formatting, columns, data management, and advanced scenarios.

Common Customization Patterns

The Grid's Excel export functionality is powered by two main components:

  1. The excelExport Event—Triggered before the export begins, allowing you to access and modify the workbook object.
  2. The Workbook API—Provides a rich set of configuration options to customize sheets, rows, columns, and cells.

Accessing the Workbook

The excelExport event provides access to the workbook configuration object that will be used to generate the Excel file.

javascript
$("#grid").kendoGrid({
    toolbar: ["excel"],
    excelExport: function(e) {
        var workbook = e.workbook;
        var sheet = workbook.sheets[0];
        
        // Access rows and cells
        var rows = sheet.rows;
        var headerRow = rows[0];
    }
});

Modifying Cell Properties

You can customize the appearance of cells by setting various properties such as background color, text color, font styles, and number formats. For a complete list of the available cell properties, refer to the Excel Appearance documentation.

javascript
$("#grid").kendoGrid({
    toolbar: ["excel"],
    excelExport: function(e) {
        var sheet = e.workbook.sheets[0];
        
        // Format a specific cell
        sheet.rows[1].cells[0].background = "#ffff00";
        sheet.rows[1].cells[0].color = "#000000";
        sheet.rows[1].cells[0].bold = true;
        sheet.rows[1].cells[0].format = "0.00";
    }
});

Preventing Default Export

You can prevent the default export behavior to implement custom logic before saving the file.

javascript
$("#grid").kendoGrid({
    toolbar: ["excel"],
    excelExport: function(e) {
        // Prevent default export to apply custom logic
        e.preventDefault();
        
        // Perform custom operations
        // ... your code
        
        // Manually save
        kendo.saveAs({
            dataURI: new kendo.ooxml.Workbook(e.workbook).toDataURL(),
            fileName: "CustomExport.xlsx"
        });
    }
});

Customization Scenarios

The following sections demonstrate common customization scenarios for Grid Excel export. Each scenario addresses specific requirements and provides working examples.

Basic Formatting

Customize the visual appearance of exported data including cell formats, colors, fonts, and styling.

Cell and Date Formatting

  • Format Cell Values—Apply custom number formats, currency, percentages, and other cell value formats in the exported Excel file.
  • Format Date Cells—Configure proper date formatting for date columns to ensure dates display correctly in Excel.

Visual Styling

Layout

Column Customization

Control which columns are exported and how they appear in the Excel file.

Column Selection and Visibility

Column Manipulation

Data Filtering and Selection

Manage which data gets exported, including filtered datasets and partial data exports.

Filtering

Data Range Selection

Hierarchical and Grouped Data

Export complex data structures including master-detail relationships and grouped data.

Master-Detail Exports

Grouped Data

Advanced Content

Export special content types including images, hyperlinks, formulas, and HTML content.

Rich Content Types

Content Processing

Export Configuration

Customize the export process, file naming, and user interactions.

File Management

Advanced Configuration

See Also