WxyXafExcel 1.1.0
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package WxyXafExcel --version 1.1.0
NuGet\Install-Package WxyXafExcel -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WxyXafExcel" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WxyXafExcel" Version="1.1.0" />
<PackageReference Include="WxyXafExcel" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WxyXafExcel --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WxyXafExcel, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WxyXafExcel@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WxyXafExcel&version=1.1.0
#tool nuget:?package=WxyXafExcel&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Wxy.XafExcel
强大的 DevExpress XAF Excel 导入/导出模块
功能特性
- ✅ 列表视图导入/导出按钮
- ✅ 批量导出多个列表
- ✅ 支持自定义字段映射
- ✅ 数据验证
- ✅ 编码自动检测
- ✅ 跨平台支持 (WinForms & Blazor)
- ✅ 列顺序控制 (SortOrder/ColumnIndex)
- ✅ 未设置顺序时按 XPO 属性声明顺序输出
使用方法
1. 安装 NuGet 包
dotnet add package Wxy.XafExcel
2. 注册模块
Blazor (Startup.cs):
builder.Modules.Add<WxyXafExcel.WxyXafExcelModule>();
WinForms (Startup.cs):
builder.Modules.Add<WxyXafExcel.WxyXafExcelModule>();
3. 标记业务对象
[ExcelImportExport]
public class Product : BaseObject
{
[ExcelField("产品名称", SortOrder = 1)]
public string Name { get; set; }
[ExcelField("价格", SortOrder = 2)]
public decimal Price { get; set; }
[ExcelField("数量", SortOrder = 3)]
public int Quantity { get; set; }
}
高级特性
列顺序控制
使用 SortOrder 或 ColumnIndex 控制 Excel 导出列顺序:
[ExcelField("名称", SortOrder = 1)]
public string Name { get; set; }
[ExcelField("价格", SortOrder = 2)]
public decimal Price { get; set; }
如果未设置 SortOrder,列将按照 XPO 对象属性声明顺序输出。
自定义字段映射
[ExcelField("员工姓名", SortOrder = 1)]
public string Name { get; set; }
[ExcelField("工号", SortOrder = 2)]
public string EmployeeCode { get; set; }
[ExcelField("入职日期", SortOrder = 3, DataFormat = "yyyy-mm-dd")]
public DateTime HireDate { get; set; }
数据验证
[ExcelField("年龄", SortOrder = 4, MinimumValue = 18, MaximumValue = 65)]
public int Age { get; set; }
[ExcelField("邮箱", SortOrder = 5)]
[RuleRequiredField]
public string Email { get; set; }
平台支持
- .NET 8.0
- DevExpress XAF 25.1.*
- Blazor Server
- WinForms
文档
详细文档请访问: https://github.com/wxy8000/wxyXafExcel
许可证
MIT License
| 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. net8.0-windows7.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- DevExpress.ExpressApp (>= 25.1.7)
- DevExpress.ExpressApp.Blazor (>= 25.1.7)
- DevExpress.ExpressApp.Win (>= 25.1.7)
- DevExpress.Spreadsheet.Core (>= 25.1.7)
- DevExpress.Xpo (>= 25.1.7)
- DocumentFormat.OpenXml (>= 2.20.0)
- Microsoft.AspNetCore.Components (>= 8.0.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.JSInterop (>= 8.0.0)
-
net8.0-windows7.0
- DevExpress.ExpressApp (>= 25.1.7)
- DevExpress.ExpressApp.Blazor (>= 25.1.7)
- DevExpress.ExpressApp.Win (>= 25.1.7)
- DevExpress.Spreadsheet.Core (>= 25.1.7)
- DevExpress.Xpo (>= 25.1.7)
- DocumentFormat.OpenXml (>= 2.20.0)
- Microsoft.AspNetCore.Components (>= 8.0.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.JSInterop (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
v1.1.0 - 支持列顺序控制 - 未设置 SortOrder 时按 XPO 属性声明顺序输出 - 优化导出字段排序逻辑 - 支持跨平台 WinForms 和 Blazor