Skip to content

Commit 9df9e51

Browse files
committed
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
1 parent 77cf5f2 commit 9df9e51

File tree

7 files changed

+24
-37
lines changed

7 files changed

+24
-37
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace MiniExcelLibs.Attributes
2+
{
3+
using System;
4+
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
5+
public class ExcelColumnNameAttribute : Attribute
6+
{
7+
public string ExcelColumnName { get; set; }
8+
public ExcelColumnNameAttribute(string excelColumnName) => ExcelColumnName = excelColumnName;
9+
}
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
3+
namespace MiniExcelLibs.Attributes
4+
{
5+
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
6+
public class ExcelIgnoreAttribute : Attribute
7+
{
8+
public bool ExcelIgnore { get; set; }
9+
public ExcelIgnoreAttribute(bool excelIgnore = true) => ExcelIgnore = excelIgnore;
10+
}
11+
}

src/MiniExcel/MiniExcelLibs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
<RepositoryType>Github</RepositoryType>
2525
</PropertyGroup>
2626
<ItemGroup Condition=" '$(TargetFramework)' == 'net461'">
27-
<Reference Include="System.IO.Compression" />
27+
<Reference Include="System.IO.Compression" />
2828
</ItemGroup>
2929
</Project>

src/MiniExcel/Utils/ExcelColumnNameAttribute.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/MiniExcel/Utils/ExcelIgnoreAttribute.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/MiniExcel/Utils/Helpers.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace MiniExcelLibs.Utils
22
{
3+
using MiniExcelLibs.Attributes;
34
using System;
45
using System.Collections;
56
using System.Collections.Generic;

tests/MiniExcelTests/MiniExcelOpenXmlTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
using System.Data.SQLite;
1212
using Dapper;
1313
using System.Globalization;
14-
using System.IO.Compression;
15-
using System.Text;
16-
using System.Xml.Linq;
1714
using static MiniExcelLibs.Tests.Utils.MiniExcelOpenXml;
1815
using MiniExcelLibs.Tests.Utils;
19-
using static MiniExcelLibs.Utils.Helpers;
16+
using MiniExcelLibs.Attributes;
2017

2118
namespace MiniExcelLibs.Tests
2219
{

0 commit comments

Comments
 (0)