ExcelToEnumerable icon indicating copy to clipboard operation
ExcelToEnumerable copied to clipboard

IsRequired

Open FBiDev opened this issue 1 year ago • 1 comments

when use IsRequired after using UsesColumnNamed he define IsRequired to all Cells that use UsesColumnNamed

i put a example here:

var op = new ExcelToEnumerableOptionsBuilder<Favorecido>(); op.Build(); op.IgnoreColumsWithoutMatchingProperties(); op.AllPropertiesOptionalByDefault();

op.Property(p => p.CodigoDocumento).UsesColumnNamed("CodigoDocumentoX"); op.Property(p => p.EndBairro).UsesColumnNamed("Bairro"); op.Property(p => p.EndBairro).IsRequired(); arquivo.Path.ExcelToEnumerable<Favorecido>(op);

he accused that "CodigoDocumentoX" is Required, but i put in EndBairro

FBiDev avatar Aug 19 '24 16:08 FBiDev

Yes, I have the same issue. Every property is required too. It's seem that the packaged nuget version is not aligned with the code itself. I cant see the namespace ExcelToEnumerable.Attributes.

miguel-fernandez-corral avatar Oct 05 '24 08:10 miguel-fernandez-corral