Beispiel #1
0
 public CellAddress(ExcelReference reference) : this(reference.SheetNameLocal(),
                                                     reference.RowFirst, reference.RowLast, reference.ColumnFirst, reference.ColumnLast)
 {
     if (reference.InnerReferences.Count > 1)
     {
         throw new ArgumentException("CellAddress 只能包括一个区域");
     }
     _cellReference = reference;
 }
Beispiel #2
0
        /// <summary>
        ///     单元格范围地址
        /// </summary>
        /// <param name="range"></param>
        /// <returns></returns>
        public static string Address(this ExcelReference range)
        {
            string sheetName = range.SheetNameLocal();

            return($"{sheetName}!{range.AddressLocal()}");
        }