The requested page is not available for the requested platform. You are viewing the content for Default platform.

How to: Add Custom Information to the Exported Excel Workbook using CustomizeExportDocument

  • 4 min to read

The ASPxDashboard.CustomizeExportDocument event allows you to obtain the stream of the exported document using the CustomizeExportDocumentEventArgs.Stream property and customize the document's layout according to your requirements. For instance, Excel documents can be loaded into the Workbook component for further processing.

This example shows how to add a custom header to each sheet for the exported workbook.

<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="WebDashboardForm.aspx.vb" Inherits="WebDashboard_CustomizeExport.WebDashboardForm" %>
<%@ Register assembly="DevExpress.Dashboard.v17.1.Web, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
    namespace="DevExpress.DashboardWeb" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v17.1, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
    namespace="DevExpress.Web" tagprefix="dx" %>
<!DOCTYPE html>
<html xmlns="">
<head id="Head1" runat="server">
<body >
    <form id="form1" runat="server">
    <div style="position:absolute; left:0; right:0; top:0; bottom:0;">
        <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" 
            AllowExportDashboardItems="True" Height="100%" Width="100%" WorkingMode="ViewerOnly"