Aakash.ExcelAccelerator
1.0.5
dotnet add package Aakash.ExcelAccelerator --version 1.0.5
NuGet\Install-Package Aakash.ExcelAccelerator -Version 1.0.5
<PackageReference Include="Aakash.ExcelAccelerator" Version="1.0.5" />
<PackageVersion Include="Aakash.ExcelAccelerator" Version="1.0.5" />
<PackageReference Include="Aakash.ExcelAccelerator" />
paket add Aakash.ExcelAccelerator --version 1.0.5
#r "nuget: Aakash.ExcelAccelerator, 1.0.5"
#:package Aakash.ExcelAccelerator@1.0.5
#addin nuget:?package=Aakash.ExcelAccelerator&version=1.0.5
#tool nuget:?package=Aakash.ExcelAccelerator&version=1.0.5
Cognine.ExcelAccelerator
A reusable .NET 8 Excel export framework designed to simplify and standardize Excel exports across enterprise applications.
ExcelAccelerator provides a plug-and-play export experience through a reusable Web Component, configurable export options, and support for multiple Excel engines including OpenXML, ClosedXML, and EPPlus.
Consumers can export data with minimal configuration by either:
- Providing an API endpoint (
data-url) - Providing a repository and method name
The package automatically handles data retrieval, column selection, export customization, and Excel file generation.
Installation
dotnet add package Cognine.ExcelAccelerator
Automatic Setup
When the package is installed in an ASP.NET Core application, ExcelAccelerator automatically configures the application during build.
Generated configuration includes:
builder.Services.AddExcelAcceleratorWithOpenXml();
app.MapExcelAccelerator();
Alternative registrations for ClosedXML and EPPlus are also generated as comments.
Automatic setup generation can be disabled using:
<ExcelAcceleratorGenerateSetup>false</ExcelAcceleratorGenerateSetup>
Frontend Setup
ExcelAccelerator includes a reusable Web Component that is distributed through ASP.NET Core Static Web Assets.
Add the following script reference to your application's layout page (typically _Layout.cshtml) before using the component:
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
Once the script is loaded, the excel-export-options Web Component is automatically registered and can be used anywhere in the application.
Key Features
Reusable Web Component
ExcelAccelerator includes a reusable Web Component that can be added directly to any page:
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
The component automatically provides:
- Export button
- Export configuration popup
- Automatic column discovery
- Column selection
- Header color selection
- Freeze header option
- Auto-filter option
- Striped rows option
- File name customization
- Preference persistence using browser local storage
API-Based Export
Export data directly from an API endpoint.
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Flow:
Web Component
↓
Consumer API
↓
ExcelAccelerator Export Engine
↓
Excel Download
The component supports authenticated APIs and automatically uses the current browser session and cookies when retrieving export data.
Repository + Method Based Export
Export data directly from the backend without exposing a dedicated API endpoint.
<excel-export-options
entity="EmployeeRecord"
repository="IDataRepository"
method-name="GetAllAsync"
label="Export Employees">
</excel-export-options>
Flow:
Web Component
↓
ExcelAccelerator
↓
Repository Method Invocation
↓
Excel Engine
↓
Excel Download
Export Customization
The built-in export popup supports:
- Column Selection
- Header Color Selection
- Freeze Header Row
- Auto Filter
- Striped Rows
- File Name Customization
- Preference Persistence
Users can configure export settings without any additional frontend development.
Export Flow
User Clicks Export
↓
Web Component
↓
Fetch Data (API or Repository)
↓
Export Configuration Popup
↓
POST /excel-accelerator/export
↓
Selected Excel Engine
↓
Excel Download
Supported Data Sources
ExcelAccelerator supports exporting data from:
- REST APIs
- ASP.NET MVC JsonResult actions
- ASP.NET Core API Controllers
- Repository methods
- Dynamic JSON responses
Supported Frontend Frameworks
ExcelAccelerator is built using Web Components and can be integrated into any frontend technology that supports standard HTML and JavaScript.
ASP.NET Core MVC
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Razor Pages
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Blazor Server / Blazor WebAssembly
Add the script reference to:
wwwroot/index.html
or
Pages/_Host.cshtml
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
Then use:
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
React
Add the script reference to:
public/index.html
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
Use the component directly:
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Angular
Add the script reference to:
src/index.html
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
Add:
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule {}
Use:
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Vue
Add the script reference to:
public/index.html
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
Use:
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
jQuery Applications
<script src="/_content/Cognine.ExcelAccelerator/excel-export-options.js" defer></script>
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Supported Excel Engines
OpenXML SDK
builder.Services.AddExcelAcceleratorWithOpenXml();
- Free and open source
- No license required
- Lightweight and high-performance
ClosedXML
builder.Services.AddExcelAccelerator();
- Free and open source
- Rich formatting support
- Easy to use
EPPlus
ExcelPackage.LicenseContext =
LicenseContext.NonCommercial;
builder.Services.AddExcelAcceleratorWithEPPlus();
- Advanced Excel features
- Conditional formatting
- Charts and Pivot Tables
- Commercial license required for production use
Why ExcelAccelerator?
- Minimal consumer configuration
- Reusable across multiple applications
- Supports both API and Repository-based exports
- Supports authenticated APIs
- No custom export page implementation required
- Multiple Excel engine support
- Built-in export configuration UI
- Automatic column discovery
- Centralized export logic
- Consistent user experience across applications
Quick Start
API-Based Export
<excel-export-options
data-url="/api/employees"
label="Export Employees">
</excel-export-options>
Repository-Based Export
<excel-export-options
entity="EmployeeRecord"
repository="IDataRepository"
method-name="GetAllAsync"
label="Export Employees">
</excel-export-options>
Advanced Usage: Exporting Filtered and Sorted Data
ExcelAccelerator exports the data returned by the configured data-url.
Applications that support search, filtering, or sorting can update the data-url dynamically to include the same query parameters used by the UI. This ensures that the exported data matches the data currently displayed to the user.
Example:
/api/employees?search=101&sortBy=salary&sortOrder=desc
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- ClosedXML (>= 0.105.0)
- EPPlus (>= 7.3.0)
- System.Linq (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.