private CellData GetCell(XElement c) { var cell = new CellData(); cell.Range = GetRange(c); cell.Value = GetValue(c); return cell; }
public static string GetValue(CellData headerCell, Dictionary<CellData, CellData> row) { if (headerCell != null && row.ContainsKey(headerCell)) { string value = row[headerCell].Value; if (!string.IsNullOrWhiteSpace(value)) { value = value.Trim(); } return value; } return string.Empty; }