?? Blazor Pivot Table: Custom Excel Cell Value Export
Customize cell values during Excel export — Learn professional techniques for enhancing Pivot Table data formatting and applying custom transformations when exporting to Excel using Blazor and Syncfusion components.
Overview
This example demonstrates how to customize cell values in a Blazor Pivot Table during Excel export operations. Apply custom formatting, data transformations, and conditional logic to enrich exported data with dynamic calculations and styled output.
Key Features
- ? Cell Value Customization: Transform and format cell values during export
- ? Blazor Integration: Seamless Syncfusion Pivot Table component usage
- ? Custom Formatting: Apply number, date, and text formatting rules
- ? Data Transformation: Real-time calculations and logic during export
- ? Export Functionality: Direct Excel export with customized outputs
Technology Stack
- Framework: ASP.NET Core Blazor (Server-Side)
- Language: C# 11+
- .NET Version: 7.0+
- UI Components: Syncfusion.Blazor.PivotTable v23.1.44
- Excel Engine: Syncfusion.Blazor components
Installation & Quick Start
Prerequisites
- Visual Studio 2022 or VS Code
- .NET 7.0 SDK or later
- Syncfusion license (community edition available)
Setup Steps
- Clone this repository
- Open
CustomizingCellValue.slnin Visual Studio 2022 - Restore NuGet packages:
Right-click Solution ? Restore NuGet Packages - Build the solution:
Ctrl+Shift+B - Run the project:
F5
The application launches at http://localhost:5001
Usage
- Interact with the Pivot Table UI
- Configure rows, columns, and value fields
- Modify cell data as needed
- Click Export to Excel to download
- Open the Excel file to see custom-formatted cell values
Project Structure
+-- Pages/
¦ +-- Index.razor # Main Pivot Table UI
¦ +-- FetchData.razor # Data source
+-- Data/
¦ +-- WeatherForecast.cs # Data models
¦ +-- WeatherForecastService.cs
+-- appsettings.json # Configuration
+-- Program.cs # Startup setup
Configuration
Modify appsettings.json and appsettings.Development.json to customize:
- Logging levels
- Environment-specific settings
- Export paths
Troubleshooting
Pivot Table not rendering?
- Verify Syncfusion packages installed
- Check browser console for errors
Export not working?
- Ensure export directory has write permissions
- Confirm Syncfusion license is valid
Resources
License
This project is licensed under the Syncfusion Community License. See Syncfusion License for details.
Support
Need help? Check the troubleshooting section or visit Syncfusion Support