This package provides functionality to utilize the features of the Syncfusion® MAUI DataGridExport control for exporting data to Excel and PDF formats.
Install
| Product | Versions |
|---|---|
| .NET |
README
Syncfusion .NET MAUI DataGrid Export
The Syncfusion .NET MAUI DataGrid Export package provides export support for the Syncfusion DataGrid control in .NET MAUI applications. It enables developers to export DataGrid content to Excel and PDF file formats while preserving data, cell styles, formatting, and grid structure. Designed to integrate seamlessly with the MAUI DataGrid, this package helps create professional reports, share data efficiently, and maintain a consistent appearance between the displayed grid and exported documents.
Documentation · Getting Started · API Reference · Demos on GitHub · Product Page · Release Notes

Using this package with an AI coding agent
Before generating Syncfusion code, ask your AI coding agent to run the Syncfusion setup using the following prompt:
Set up this project for Syncfusion before generating code. Fetch and follow the official instructions at https://ai.syncfusion.com, then report the detected platform, installed skill pack, MCP status, and any required licensing action.The setup detects your project’s platform and loads the appropriate Syncfusion skill pack. No Syncfusion account or MCP key is required to install or read Syncfusion agent skills.
Platform reference: https://ai.syncfusion.com/maui/llms.txt
Key features
Export capabilities
- Export Syncfusion DataGrid content to Excel workbooks.
- Export Syncfusion DataGrid content to PDF documents.
- Preserve data, cell styles, formatting, and grid structure during export.
- Generate professional reports from the same grid data shown in the app.
Integration
- Integrates seamlessly with the Syncfusion MAUI DataGrid.
- Maintains a consistent appearance between the on-screen grid and the exported file.
- Uses the Syncfusion export libraries included with the package.
Supported platforms and target frameworks
| Platform | Target framework |
|---|---|
| Android | net9.0-android, net10.0-android |
| iOS | net9.0-ios, net10.0-ios |
| Mac Catalyst | net9.0-maccatalyst, net10.0-maccatalyst |
| Windows | net9.0-windows10.0.19041, net10.0-windows10.0.19041 |
Minimum OS versions follow the .NET MAUI supported platforms.
Installation
.NET CLI
dotnet add package Syncfusion.Maui.DataGridExport
Package Manager Console
Install-Package Syncfusion.Maui.DataGridExport
Getting started
1. Register the Syncfusion core handler
In MauiProgram.cs, call ConfigureSyncfusionCore():
using Syncfusion.Maui.Core.Hosting;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore();
return builder.Build();
}
}
2. Add the export package
Install the package in your project:
dotnet add package Syncfusion.Maui.DataGridExport
3. Export the DataGrid content
Use the Syncfusion DataGrid export APIs to generate Excel or PDF output from your grid data. The following examples show the most common export patterns.
Sample DataGrid view
<StackLayout>
<Button Text="Export to Excel" Clicked="ExportToExcel_Clicked" />
<Button Text="Export to PDF" Clicked="ExportToPDF_Clicked" />
<syncfusion:SfDataGrid x:Name="dataGrid"
ItemsSource="{Binding OrderInfoCollection}"
AutoGenerateColumnsMode="None"
ColumnWidthMode="Auto">
<syncfusion:SfDataGrid.Columns>
<syncfusion:DataGridNumericColumn MappingName="OrderID" HeaderText="Order ID" Format="D" />
<syncfusion:DataGridTextColumn MappingName="CustomerID" HeaderText="Customer ID" />
<syncfusion:DataGridTextColumn MappingName="Customer" HeaderText="Customer" />
<syncfusion:DataGridTextColumn MappingName="ShipCountry" HeaderText="Ship Country" />
<syncfusion:DataGridTextColumn MappingName="ShipCity" HeaderText="Ship City" />
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
</StackLayout>
Export to Excel
private void ExportToExcel_Clicked(object sender, EventArgs e)
{
var excelExport = new DataGridExcelExportingController();
var exportOption = new DataGridExcelExportingOption();
var excelEngine = excelExport.ExportToExcel(this.dataGrid, exportOption);
var workbook = excelEngine.Excel.Workbooks[0];
using MemoryStream stream = new();
workbook.SaveAs(stream);
workbook.Close();
excelEngine.Dispose();
var saveService = new SaveService();
saveService.SaveAndView("ExportFeature.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", stream);
}
Export to PDF
private void ExportToPDF_Clicked(object sender, EventArgs e)
{
var pdfExport = new DataGridPdfExportingController();
var exportOption = new DataGridPdfExportingOption();
var pdfDocument = pdfExport.ExportToPdf(this.dataGrid, exportOption);
using MemoryStream stream = new();
pdfDocument.Save(stream);
pdfDocument.Close(true);
var saveService = new SaveService();
saveService.SaveAndView("ExportFeature.pdf", "application/pdf", stream);
}
Export to PDF grid layout
private void ExportToPdfGrid_Clicked(object sender, EventArgs e)
{
var pdfExport = new DataGridPdfExportingController();
var pdfDocument = new PdfDocument();
var pdfGrid = pdfExport.ExportToPdfGrid(this.dataGrid, this.dataGrid.View,
new DataGridPdfExportingOption { CanFitAllColumnsInOnePage = false }, pdfDocument);
PdfPage page = pdfDocument.Pages.Add();
pdfGrid.Draw(page, new Syncfusion.Drawing.PointF(10, 10));
using MemoryStream stream = new();
pdfDocument.Save(stream);
pdfDocument.Close(true);
var saveService = new SaveService();
saveService.SaveAndView("ExportFeature.pdf", "application/pdf", stream);
}
Note:
DataGridTemplateColumncannot be exported to Excel or PDF. Use standard columns such asDataGridTextColumnandDataGridNumericColumn, or exclude template columns when exporting.
For more details, see the Excel export guide and PDF export guide.
Dependencies
Installing this package also installs the following packages:
Syncfusion.Maui.ButtonsSyncfusion.Maui.CoreSyncfusion.Maui.DataSyncfusion.Maui.DataGridSyncfusion.Maui.DataPagerSyncfusion.Maui.DataSourceSyncfusion.Maui.GridCommonSyncfusion.Maui.InputsSyncfusion.Maui.ListViewSyncfusion.Maui.PickerSyncfusion.Maui.PopupSyncfusion.Maui.PullToRefreshSyncfusion.Maui.SlidersSyncfusion.Pdf.NETSyncfusion.XlsIO.NET
Licensing
This is a commercial product and requires a valid license. You have three options:
- Free Community License: for individual developers and small businesses. Check eligibility
- 30-day free trial: Start a trial
- Commercial license: View pricing
Register your license key
Register the key in App.xaml.cs before the app is built:
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
For details, see Licensing overview. Use of this package is subject to the Syncfusion EULA.
Support and feedback
- Support tickets: Syncfusion Support Portal
- Community forums: .NET MAUI Forums
- Feature requests and bug reports: Feedback Portal
- Samples: Syncfusion .NET MAUI demos on GitHub
About Syncfusion
Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 26,000+ customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.
Today, we provide 1600+ components and frameworks for web (Blazor, ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Flutter), mobile (.NET MAUI, Xamarin, Flutter, UWP, and JavaScript), and desktop development (WinForms, WPF, WinUI, Flutter and UWP). We provide ready-to-deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.
[email protected] | www.syncfusion.com | Toll Free: 1-888-9 DOTNET
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.