📌  相关文章
📜  office open xml 检查行是否为空 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:20.499000             🧑  作者: Mango

代码示例1
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
}