office open xml check if row is empty code example
Example: office open xml check if row is empty
var sheetData = part.Worksheet.Elements().First();
var rows = sheetData.Elements().ToList();
for (var rowIndex = 0; rowIndex < rows.Count; rowIndex++)
{
var row = rows[rowIndex];
if (string.IsNullOrWhiteSpace(row.InnerText)) continue;
// Row is not empty
}