We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77443c5 commit 2d2abf2Copy full SHA for 2d2abf2
1 file changed
SharpExcel/Exporters/BaseSharpExcelSynchronizer.cs
@@ -232,12 +232,12 @@ private static int FindAndMapHeaderRow(
232
.Any(c => headerNames.Contains(c.Value.ToString().ToLowerInvariant())))
233
.FirstOrDefault()?.WorksheetRow();
234
235
+ var headerRowId = headerRow!.RowNumber();
236
+
237
var propertiesByColumnName = instance.Properties.PropertyMappings.ToDictionary(x => x.NormalizedName);
238
239
var startIndex = usedArea.FirstCell().WorksheetColumn().ColumnNumber();
240
-
241
if (rule.Column != null && rule.Column > startIndex)
242
startIndex = rule.Column ?? 1;
243
@@ -262,7 +262,7 @@ private static int FindAndMapHeaderRow(
262
}
263
264
265
- return headerRow!.RowNumber() - 1;
+ return headerRowId <= 1 ? 2 : headerRowId - 1;
266
267
268
/// <summary>
0 commit comments