mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-11-30 02:47:39 +08:00
0.10.0
- [New] Query dynamic with first head will ignore blank/whitespace columns - [New] Query type mapping support Custom POCO excel column name/ignore attribute
This commit is contained in:
parent
77cf5f2feb
commit
9df9e51946
10
src/MiniExcel/Attributes/ExcelColumnNameAttribute.cs
Normal file
10
src/MiniExcel/Attributes/ExcelColumnNameAttribute.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace MiniExcelLibs.Attributes
|
||||
{
|
||||
using System;
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public class ExcelColumnNameAttribute : Attribute
|
||||
{
|
||||
public string ExcelColumnName { get; set; }
|
||||
public ExcelColumnNameAttribute(string excelColumnName) => ExcelColumnName = excelColumnName;
|
||||
}
|
||||
}
|
11
src/MiniExcel/Attributes/ExcelIgnoreAttribute.cs
Normal file
11
src/MiniExcel/Attributes/ExcelIgnoreAttribute.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace MiniExcelLibs.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public class ExcelIgnoreAttribute : Attribute
|
||||
{
|
||||
public bool ExcelIgnore { get; set; }
|
||||
public ExcelIgnoreAttribute(bool excelIgnore = true) => ExcelIgnore = excelIgnore;
|
||||
}
|
||||
}
|
@ -24,6 +24,6 @@
|
||||
<RepositoryType>Github</RepositoryType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net461'">
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,16 +0,0 @@
|
||||
namespace MiniExcelLibs.Utils
|
||||
{
|
||||
using System;
|
||||
|
||||
internal static partial class Helpers
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public class ExcelColumnNameAttribute : Attribute
|
||||
{
|
||||
public string ExcelColumnName { get; set; }
|
||||
public ExcelColumnNameAttribute(string excelColumnName) => ExcelColumnName = excelColumnName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
namespace MiniExcelLibs.Utils
|
||||
{
|
||||
using System;
|
||||
|
||||
internal static partial class Helpers
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public class ExcelIgnoreAttribute : Attribute
|
||||
{
|
||||
public bool ExcelIgnore { get; set; }
|
||||
public ExcelIgnoreAttribute(bool excelIgnore = true) => ExcelIgnore = excelIgnore;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
namespace MiniExcelLibs.Utils
|
||||
{
|
||||
using MiniExcelLibs.Attributes;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -11,12 +11,9 @@ using System.Collections.Generic;
|
||||
using System.Data.SQLite;
|
||||
using Dapper;
|
||||
using System.Globalization;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using static MiniExcelLibs.Tests.Utils.MiniExcelOpenXml;
|
||||
using MiniExcelLibs.Tests.Utils;
|
||||
using static MiniExcelLibs.Utils.Helpers;
|
||||
using MiniExcelLibs.Attributes;
|
||||
|
||||
namespace MiniExcelLibs.Tests
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user