|  | @@ -5,7 +5,6 @@ namespace ExcelORM
 | 
											
												
													
														|  |      public class Mapping
 |  |      public class Mapping
 | 
											
												
													
														|  |      {
 |  |      {
 | 
											
												
													
														|  |          public string? PropertyName { get; set; }
 |  |          public string? PropertyName { get; set; }
 | 
											
												
													
														|  | -        public Type? PropertyType { get; set; }
 |  | 
 | 
											
												
													
														|  |          public int? Position { get; set; }
 |  |          public int? Position { get; set; }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          public static List<Mapping>? MapProperties<T>(IXLCells? headerCells) where T : new()
 |  |          public static List<Mapping>? MapProperties<T>(IXLCells? headerCells) where T : new()
 | 
											
										
											
												
													
														|  | @@ -17,12 +16,13 @@ namespace ExcelORM
 | 
											
												
													
														|  |              var properties = objectToRead.GetType().GetProperties();
 |  |              var properties = objectToRead.GetType().GetProperties();
 | 
											
												
													
														|  |              foreach (var property in properties)
 |  |              foreach (var property in properties)
 | 
											
												
													
														|  |              {
 |  |              {
 | 
											
												
													
														|  | -                int? position = null;
 |  | 
 | 
											
												
													
														|  | -                var columnAttribute = property.GetCustomAttributes(typeof(ColumnAttribute), false).FirstOrDefault() as ColumnAttribute;
 |  | 
 | 
											
												
													
														|  | -                position = columnAttribute is { Names.Length: > 0 } ? headerCells.FirstOrDefault(x => !x.Value.IsBlank && Array.Exists(columnAttribute.Names, y => y.Equals(x.Value.ToString(), StringComparison.InvariantCultureIgnoreCase)))?.Address.ColumnNumber : headerCells.FirstOrDefault(x => !x.Value.IsBlank && x.Value.ToString().Equals(property.Name, StringComparison.InvariantCultureIgnoreCase))?.Address.ColumnNumber;
 |  | 
 | 
											
												
													
														|  | 
 |  | +                var position = property.GetCustomAttributes(typeof(ColumnAttribute), false).FirstOrDefault() is ColumnAttribute { Names.Length: > 0 } columnAttribute
 | 
											
												
													
														|  | 
 |  | +                    ?
 | 
											
												
													
														|  | 
 |  | +                    headerCells.FirstOrDefault(x => !x.Value.IsBlank && Array.Exists(columnAttribute.Names, y => y.Equals(x.Value.ToString(), StringComparison.InvariantCultureIgnoreCase)))?.Address.ColumnNumber
 | 
											
												
													
														|  | 
 |  | +                    : headerCells.FirstOrDefault(x => !x.Value.IsBlank && x.Value.ToString().Equals(property.Name, StringComparison.InvariantCultureIgnoreCase))?.Address.ColumnNumber;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  if (position == null) continue;
 |  |                  if (position == null) continue;
 | 
											
												
													
														|  | -                map.Add(new Mapping { PropertyName = property.Name, PropertyType = property.PropertyType, Position = position });
 |  | 
 | 
											
												
													
														|  | 
 |  | +                map.Add(new Mapping { PropertyName = property.Name, Position = position });
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              if (map.Count == properties.Length)
 |  |              if (map.Count == properties.Length)
 |