Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g-s-c-code/datagridexporter
A lightweight Excel export utility for MudBlazor DataGrid in .NET, enabling simple and efficient spreadsheet generation directly from grid data. Built with OpenXML and JavaScript interop for seamless browser-based file downloads.
https://github.com/g-s-c-code/datagridexporter
blazor csharp dotnet excel-export file-export mudblazor openxml spreadsheet
Last synced: 19 days ago
JSON representation
A lightweight Excel export utility for MudBlazor DataGrid in .NET, enabling simple and efficient spreadsheet generation directly from grid data. Built with OpenXML and JavaScript interop for seamless browser-based file downloads.
- Host: GitHub
- URL: https://github.com/g-s-c-code/datagridexporter
- Owner: g-s-c-code
- License: mit
- Created: 2024-12-01T18:28:10.000Z (22 days ago)
- Default Branch: master
- Last Pushed: 2024-12-03T14:21:02.000Z (20 days ago)
- Last Synced: 2024-12-03T14:23:18.515Z (20 days ago)
- Topics: blazor, csharp, dotnet, excel-export, file-export, mudblazor, openxml, spreadsheet
- Language: JavaScript
- Homepage: https://datagridexporter.netlify.app/
- Size: 13.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MudBlazor DataGrid Excel Exporter
## Overview
This library provides Excel export functionality for MudBlazor DataGrid components in .NET applications, allowing easy conversion of grid data into Excel spreadsheets. Link: [datagridexporter.netlify.app](https://datagridexporter.netlify.app/)
## Acknowledgments
This project is substantially based on the work originally developed by [timmac-qmc](https://github.com/timmac-qmc). Credit is given to the original author for the foundational implementation.
## Features
- Easy one-method export for MudBlazor DataGrids
- Supports both simple and extended sheet formats
- Automatic number and text cell type detection
- Configurable column visibility
- Browser-based file download using JavaScript interop## Installation
### Dependencies
- Microsoft.AspNetCore.Components
- MudBlazor
- DocumentFormat.OpenXml### Setup
1. Install the required NuGet packages (see dependencies)
2. Copy the project files into your solution
3. Ensure the JavaScript file (`saveFileAs.js`) is included and referenced in your project## Usage Example
```csharp
@inject IJSRuntime JSRuntime
Export to Excel
@code {
private async Task ExportToExcel()
{
await grid.ExportMudDataGrid(JSRuntime, "exported_data.xlsx");
}
}
```## Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Open a Pull Request## License
Distributed under the MIT License.