ZofX.NpoiXHelper
6.7.0
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.6.1
This package targets .NET Framework 4.6.1. The package is compatible with this framework or higher.
dotnet add package ZofX.NpoiXHelper --version 6.7.0
NuGet\Install-Package ZofX.NpoiXHelper -Version 6.7.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="ZofX.NpoiXHelper" Version="6.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZofX.NpoiXHelper" Version="6.7.0" />
<PackageReference Include="ZofX.NpoiXHelper" />
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 ZofX.NpoiXHelper --version 6.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ZofX.NpoiXHelper, 6.7.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 ZofX.NpoiXHelper@6.7.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=ZofX.NpoiXHelper&version=6.7.0
#tool nuget:?package=ZofX.NpoiXHelper&version=6.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ZofX.NpoiXHelper
功能介绍
NPOI导入导出封装类库,支持xls、xlsx,Nuget包名:ZofX.NpoiX.Helper。
使用说明
- 添加Nuget包引用,将npoi.config.sample更名为npoi.config;设置复制到输出目录为“如果较新则复制”。
- Table/Code用于标识导入导出,作为参数传入以辨别使用哪个配置。
- 导出设置到XlsExporterConfig节,Column/Code、Column/Name、Column/Property、Column/Type、Column/Formart、Column/Order分别代表导出Excel首行列名、首行列名称、数据源属性名称、数据类型(暂只支持STRING)、格式(暂不支持)和序号。
- 导入设置到XlsImporterConfig节,Column/Code、Column/Name、Column/Property、Column/Type、Column/Formart、Column/Order分别代表导入Excel首行列序号(从0开始)、首行列名称、导入属性名称、数据类型(暂只支持STRING)、格式(暂不支持)和序号。
- 导出示例:
using ZofX.NpoiXHelper;
var list = new List<T>();
XlsExporter.Export("Table/Code", list, 65530, HttpContext.Current.Response);
- 导入示例:
using ZofX.NpoiXHelper;
DataSet ds = XlsImporter.Import("Table/Code", excelPath, 1, 0);
List<T> list = XlsImporter.Import<T>("Table/Code", excelPath, 1, 0);
| 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. |
| .NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.1
- Microsoft.AspNetCore.SystemWebAdapters (>= 2.0.0)
- NPOI (>= 2.7.4)
- SharpZipLib (>= 1.4.2)
-
net8.0
- Microsoft.AspNetCore.SystemWebAdapters (>= 2.0.0)
- NPOI (>= 2.7.4)
- SharpZipLib (>= 1.4.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.