// existing rows constructor private Row(XElementData data, ISheetData sheetData) { this.Data = data; this.sheetData = sheetData; Index = int.Parse(data["r"], NumberFormatInfo.InvariantInfo); data.RemoveAttribute("spans"); // clear spans attribute, will be recalculated }
// new rows constructor private Row(XElementData data, int index, ISheetData sheetData) { if (index == 0) { throw new ArgumentException("Row index can't be zero (0)", "index"); } this.Data = data; this.sheetData = sheetData; Index = index; data.SetAttributeValue("r", index); }
public static Row New(XElementData data, int index, ISheetData sheetData) { return(new Row(data, index, sheetData)); }
public static Row FromExisting(XElementData data, ISheetData sheetData) { return(new Row(data, sheetData)); }