You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassExcelAttributeDemo{[ExcelColumnName("Column1")]publicstringTest1{get;set;}[ExcelColumnName("Column2")]publicstringTest2{get;set;}[ExcelIgnore]publicstringTest3{get;set;}[ExcelColumnIndex("I")]// system will convert "I" to 8 indexpublicstringTest4{get;set;}publicstringTest5{get;}//wihout set will ignorepublicstringTest6{get;privateset;}//un-public set will ignore[ExcelColumnIndex(3)]// start with 0publicstringTest7{get;set;}}varrows=MiniExcel.Query<ExcelAttributeDemo>(path).ToList();Assert.Equal("Column1",rows[0].Test1);Assert.Equal("Column2",rows[0].Test2);Assert.Null(rows[0].Test3);Assert.Equal("Test7",rows[0].Test4);Assert.Null(rows[0].Test5);Assert.Null(rows[0].Test6);Assert.Equal("Test4",rows[0].Test7);
Activity
[-]Support ColumnIndex/Name/Ignore Attribute[/-][+]Support ColumnIndex Attribute[/+]shps951023 commentedon Apr 3, 2021
https://github.com/shps951023/MiniExcel/pull/144
但還在考慮這個功能實不實用,自己沒用過這功能,但其他框架有提供才列在Issue
shps951023 commentedon Apr 9, 2021
0.11.1
0.11.1
shps951023 commentedon Apr 9, 2021
0.11.1
Excel Column Name/Index/Ignore Attribute
e.g
input excel :
0.11.1
0.11.1