diff --git a/ExcelMapper.Tests/ProductsDashed.xlsx b/ExcelMapper.Tests/ProductsDashed.xlsx new file mode 100644 index 0000000..bdd0480 Binary files /dev/null and b/ExcelMapper.Tests/ProductsDashed.xlsx differ diff --git a/ExcelMapper.Tests/Tests.cs b/ExcelMapper.Tests/Tests.cs index 28e4bd0..0f5cdac 100644 --- a/ExcelMapper.Tests/Tests.cs +++ b/ExcelMapper.Tests/Tests.cs @@ -2625,5 +2625,27 @@ public void EnumTest() CollectionAssert.AreEqual(products, productsFetched); } + + private record DashedProduct + { + [Column("Name-1")] + public string Name { get; } + + public DashedProduct(string name) => Name = name; + } + + [Test] + public void DashedTest() + { + var excel = new ExcelMapper("../../../ProductsDashed.xlsx"); + var products = excel.Fetch().ToList(); + + CollectionAssert.AreEqual(new List + { + new DashedProduct("Nudossi"), + new DashedProduct("Halloren"), + new DashedProduct("Filinchen"), + }, products); + } } }