/// <summary> /// Déplace le focus sur une cellule donnée. /// </summary> /// <param name="cellName">Nom de la cellule.</param> /// <returns>Le builder.</returns> public ExcelTemplateBuilder SetFocus(string cellName) { if (string.IsNullOrEmpty(cellName)) { throw new ArgumentNullException("cellName"); } _currentCell = ExcelCell.Create(this, cellName); return(this); }
/// <summary> /// Lit la liste des cellules fusionnées du tableau. /// </summary> private void ReadMergeCells() { var mergedCells = _worksheet.GetFirstChild <MergeCells>(); if (mergedCells == null) { return; } foreach (MergeCell mergeCell in mergedCells) { var arr = mergeCell.Reference.Value.Split(':'); var start = arr[0]; var end = arr[1]; var excelMergeCell = new ExcelMergeCell(ExcelCell.Create(this, start), ExcelCell.Create(this, end)); _mergeCells.Add(excelMergeCell); } }