Пример #1
0
        public override string ToString()
        {
            CellAddr ulCa = new CellAddr(colInt.min, rowInt.min),
                     lrCa = new CellAddr(colInt.max, rowInt.max);

            return(String.Format("{0}!{1}:{2}", sheet.Name, ulCa, lrCa));
        }
Пример #2
0
        public String Show(int col, int row, Formats fo)
        {
            switch (fo.RefFmt)
            {
            case Formats.RefType.A1:
                CellAddr ca = new CellAddr(this, col, row);
                return((colAbs ? "$" : "") + CellAddr.ColumnName(ca.col)
                       + (rowAbs ? "$" : "") + (ca.row + 1));

            case Formats.RefType.R1C1:
                return("R" + RelAbsFormat(rowAbs, rowRef, 1)
                       + "C" + RelAbsFormat(colAbs, colRef, 1));

            case Formats.RefType.C0R0:
                return("C" + RelAbsFormat(colAbs, colRef, 0)
                       + "R" + RelAbsFormat(rowAbs, rowRef, 0));

            default:
                throw new ImpossibleException("Unknown reference format");
            }
        }
Пример #3
0
 public FullCellAddr(Sheet sheet, CellAddr ca)
 {
     this.ca    = ca;
     this.sheet = sheet;
 }
Пример #4
0
        // Does this raref at (col, row) refer inside the sheet?
        public bool ValidAt(int col, int row)
        {
            CellAddr ca = new CellAddr(this, col, row);

            return(0 <= ca.col && 0 <= ca.row);
        }