예제 #1
0
 /// <summary>
 /// 合并单元格
 /// </summary>
 /// <param name="cell">单元格</param>
 /// <returns></returns>
 public IExcel MergeCell(ICell cell)
 {
     if (cell.NeedMerge)
     {
         MergeCell(cell.RowIndex, cell.EndRowIndex, cell.ColumnIndex, cell.EndColumnIndex);
     }
     return(this);
 }
예제 #2
0
        /// <summary>
        /// 创建单元格
        /// </summary>
        /// <param name="cell">单元格</param>
        /// <returns></returns>
        public IExcel CreateCell(ICell cell)
        {
            if (cell == null)
            {
                return(this);
            }

            _cell = GetOrCreateCell(_row, cell.ColumnIndex);
            SetCellValue(cell.Value);
            MergeCell(cell);
            return(this);
        }