public CellRangeRef(string sheetName, CellRef start, CellRef end) { this.sheetName = sheetName; this.start = new CellRef(start); this.end = new CellRef(end); Reorder(); }
public ExcelHelper(string templateFileName, string generatedFileName) { File.Copy(templateFileName, generatedFileName, true /*overwrite*/); document = SpreadsheetDocument.Open(generatedFileName, true /*isEditable*/); currentPosition = new CellRef(1, 1);//1 based indexing direction = DirectionType.TOP_TO_DOWN; }
public CellRangeRef(string value) { var match = PATTERN.Match(value); sheetName = match.Groups[1].Value; start = new CellRef(match.Groups[3].Value, match.Groups[2].Value); string endColumn = match.Groups[4].Value; if (endColumn.Length == 0) { end = new CellRef(start); } else { end = new CellRef(match.Groups[5].Value, endColumn); } }
public CellRef(CellRef right) { row = right.row; column = right.column; }
public void OffsetIt(CellRef value) { row += value.row; column += value.column; }
public CellRef CalculateOffset(CellRef value) { return(new CellRef(row - value.row, column - value.column)); }
public override bool Equals(object obj) { CellRef right = (CellRef)obj; return(row == right.row && column == right.Column); }
static public string ToString(int row, int column) { return(string.Format("{0}{1}", CellRef.Int2Column(column), row)); }