guanqixu.ExcelImport 1.4.6

dotnet add package guanqixu.ExcelImport --version 1.4.6                
NuGet\Install-Package guanqixu.ExcelImport -Version 1.4.6                
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="guanqixu.ExcelImport" Version="1.4.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add guanqixu.ExcelImport --version 1.4.6                
#r "nuget: guanqixu.ExcelImport, 1.4.6"                
#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.
// Install guanqixu.ExcelImport as a Cake Addin
#addin nuget:?package=guanqixu.ExcelImport&version=1.4.6

// Install guanqixu.ExcelImport as a Cake Tool
#tool nuget:?package=guanqixu.ExcelImport&version=1.4.6                
using ExcelImport;
using System;
using System.Collections.Generic;
using System.IO;

namespace ExcelImportDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("正在导出模板");

            var adv_helper = new Adv_ExcelImportHelper<Student>();
            adv_helper.ExportTemplate("student.xls");

            Console.WriteLine($"模板的路径:{Path.GetFullPath("student.xls")}");
        }
    }

    [ExcelSheet(SheetName = "学生表")]
    public class Student : ExcelData
    {
        [ExcelHeader("名称", Comment = "Name")]
        public string Name { get; set; }

        [ExcelHeader("年龄", Comment = "Age")]
        public string Age { get; set; }

        [ExcelHeader("性别", Comment = "Sex", ValidationData = new[] { "男", "女" })]
        public string Sex { get; set; }

        [ExcelHeader("其他")]
        public Dictionary<string, string> Others { get; set; }

        [ExcelHeader("亲属")]
        public Dictionary<string, Parent> Parents { get; set; }

        [ExcelHeader("非法集合")]
        public List<string> IllegalList { get; set; }

    }

    public class Parent
    {
        [ExcelHeader("关系")]
        public string Relations { get; set; }

        [ExcelHeader("姓名")]
        public string Name { get; set; }

        [ExcelHeader("年龄")]
        public string Age { get; set; }

        [ExcelHeader("备注")]
        public Dictionary<string, string> Remarks { get; set; }

    }
}
Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  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.

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
1.4.6 451 5/3/2021
1.4.5 302 4/30/2021
1.4.4 465 4/8/2020
1.4.3 449 4/3/2020
1.4.2 451 3/31/2020
1.4.1 432 3/31/2020
1.4.0 436 3/30/2020
1.3.0 480 3/20/2020
1.2.0 440 3/20/2020
1.1.0 445 3/19/2020
1.0.3 473 12/27/2019
1.0.2 680 12/26/2019
1.0.1 427 12/25/2019
1.0.0 436 12/25/2019

新功能
     支持分组数据的导入,具体请看用法