diff --git a/.github/workflows/ci-publish.yml b/.github/workflows/ci-publish.yml
index 95ee282..6813778 100644
--- a/.github/workflows/ci-publish.yml
+++ b/.github/workflows/ci-publish.yml
@@ -12,7 +12,8 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
SOLUTION_FILE: SuperBlazorComponents.slnx
- PACKAGE_PROJECT: src/SuperBlazorComponents/SuperBlazorComponents.csproj
+ MAIN_PACKAGE_PROJECT: src/SuperBlazorComponents/SuperBlazorComponents.csproj
+ EXPORTER_PACKAGE_PROJECT: src/SuperBlazorComponents.DataGridExporter/SuperBlazorComponents.DataGridExporter.csproj
permissions:
contents: read
@@ -64,7 +65,14 @@ jobs:
- name: Pack SuperBlazorComponents
run: >
- dotnet pack ${{ env.PACKAGE_PROJECT }}
+ dotnet pack ${{ env.MAIN_PACKAGE_PROJECT }}
+ --no-build
+ --configuration Release
+ --output ./nupkgs
+
+ - name: Pack SuperBlazorComponents.DataGridExporter
+ run: >
+ dotnet pack ${{ env.EXPORTER_PACKAGE_PROJECT }}
--no-build
--configuration Release
--output ./nupkgs
diff --git a/README.md b/README.md
index d5ac910..5c77f99 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,7 @@
| Preview | Component | Description | Docs |
|---|---|---|---|
| | **SuperDataGrid** | Virtualized data grid — frozen columns/rows, hierarchical lazy-loading rows, reordering, resizing, filtering, sorting, inline editing, row selection, settings persistence | [📖 SUPERDATAGRID.md](SUPERDATAGRID.md) |
+| | **SuperDataGrid Exporter** | Optional CSV and Excel export extension for complete filtered, sorted and virtualized datasets | [📖 SUPERDATAGRIDEXPORTER.md](SUPERDATAGRIDEXPORTER.md) |
| | **SuperLayout** | Responsive app layout — header, sidebar, body, footer, chat panel with collapsible sidebar | [📖 SUPERLAYOUT.md](SUPERLAYOUT.md) |
| | **SuperContext** | Context-aware tabs and contextual panels — discover components by runtime type and zone, render one or many contexts, and isolate host state per instance | [📖 SUPERCONTEXT.md](SUPERCONTEXT.md) |
| | **SuperTabs** | Dynamic tabbed interface — badges, closable tabs, lazy loading, persistence (URL + localStorage), keyboard navigation, service-driven management | [📖 SUPERTABS.md](SUPERTABS.md) |
diff --git a/SUPERDATAGRIDEXPORTER.md b/SUPERDATAGRIDEXPORTER.md
new file mode 100644
index 0000000..3a7034d
--- /dev/null
+++ b/SUPERDATAGRIDEXPORTER.md
@@ -0,0 +1,124 @@
+# SuperDataGrid CSV and Excel exporter
+
+The **SuperBlazorComponents.DataGridExporter** extension exports the complete
+filtered and sorted view of a **SuperDataGrid**, including rows that are not
+currently rendered by virtualization.
+
+## Installation
+
+Reference both packages/projects:
+
+~~~bash
+dotnet add package SuperBlazorComponents
+dotnet add package SuperBlazorComponents.DataGridExporter
+~~~
+
+Register the exporter and map its download endpoint in **Program.cs**:
+
+~~~csharp
+using SuperBlazorComponents.DataGridExporter;
+
+builder.Services.AddSuperComponents();
+builder.Services.AddSuperDataGridExporter(options =>
+{
+ options.TemporaryDirectory = Path.Combine(
+ builder.Environment.ContentRootPath, "_temp", "grid-exports");
+ options.FileLifetime = TimeSpan.FromHours(24);
+ options.CleanupInterval = TimeSpan.FromDays(1);
+});
+
+var app = builder.Build();
+app.MapSuperDataGridExporter();
+~~~
+
+The endpoint uses an unguessable 256-bit token and is anonymous by design.
+Files expire after **FileLifetime**; cleanup runs at startup and then at
+**CleanupInterval**.
+
+## Usage
+
+Keep a component reference to the grid and pass it to either export button:
+
+~~~razor
+@using SuperBlazorComponents.DataGridExporter.Components
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code {
+ private SuperDataGrid? _grid;
+}
+~~~
+
+Set **IconOnly="true"** to hide the text while preserving it as the tooltip
+and accessible label. The Bootstrap **ms-auto** wrapper aligns the export
+actions to the right of the grid header. The grid keeps the custom header area
+separated from its built-in actions. Omit **IconOnly** to display the icon and
+text together.
+
+Only currently visible columns are exported, in their current order. The
+exporter captures the grid filters and sort order once, then reads the complete
+result from **ItemsProvider** in batches. Hierarchical grids export root items
+only. The default batch size is 200 rows and can be changed with
+**SuperDataGridExporterOptions.BatchSize**.
+
+## Custom columns
+
+Headers are resolved in this order:
+
+1. **ExportHeader**
+2. plain text found directly in **HeaderTemplate**
+3. **Title**
+4. **Property**
+
+Values use **ExportValue** first, then **Property** or **For**. Configure both
+overrides when a column is entirely template-driven:
+
+~~~razor
+
+
+ ...
+
+
+
+@code {
+ private static object GetExportedStatus(Product item)
+ => item.IsActive ? "Active" : "Inactive";
+}
+~~~
+
+Set **Exportable="false"** to exclude a visible column.
+
+## Formats and limits
+
+- CSV defaults to UTF-8 without BOM, comma delimiter and invariant culture.
+ These defaults are configurable through **SuperDataGridExporterOptions**.
+- CSV strings beginning with formula control characters are prefixed safely by
+ default.
+- Excel preserves native number, date and boolean cell types, freezes the
+ header, reproduces the grid's left frozen columns, enables filtering and
+ sizes columns to their content. Excel cannot freeze columns from the right.
+- One worksheet supports at most 1,048,575 exported data rows because the
+ header occupies the first Excel row.
+- The grid must use **ItemsProvider**; the currently rendered virtualized items
+ alone are intentionally never treated as the complete dataset.
diff --git a/SuperBlazorComponents.slnx b/SuperBlazorComponents.slnx
index 6de2220..5e7c836 100644
--- a/SuperBlazorComponents.slnx
+++ b/SuperBlazorComponents.slnx
@@ -7,6 +7,7 @@
+
diff --git a/src/DemoWebSite/Components/Pages/SuperGridDemo.razor b/src/DemoWebSite/Components/Pages/SuperGridDemo.razor
index 20ade86..f0699b1 100644
--- a/src/DemoWebSite/Components/Pages/SuperGridDemo.razor
+++ b/src/DemoWebSite/Components/Pages/SuperGridDemo.razor
@@ -4,6 +4,7 @@
@using SuperBlazorComponents.Components.SuperDataGrid
@using SuperBlazorComponents.Components.SuperDataGrid.Filters
@using SuperBlazorComponents.Components.SuperDataGrid.Tools
+@using SuperBlazorComponents.DataGridExporter.Components
SuperGrid Demo - 5000 Items
@@ -78,10 +79,24 @@
-