Esempio n. 1
0
 private void AddCellOrRangeToken(string cellValue)
 {
     if (this.buffer.Peek() == RefFormulaToken.AbsoluteCellMark)
     {
         cellValue = this.GetCell();
     }
     if (this.GetNextOnDemand(':'))
     {
         string text1 = this.GetCell();
         if (RefFormulaToken.IsCell(text1))
         {
             this.AddArea(cellValue + ":" + text1);
         }
         else
         {
             this.Expected("Area.");
         }
     }
     else if (this.isFunctionArgumentsProcessed)
     {
         this.AddToken(FormulaTokenCode.Ref1, cellValue);
     }
     else
     {
         this.AddToken(FormulaTokenCode.Ref2, cellValue);
     }
 }
Esempio n. 2
0
        private void AddSheetReferenceToken(string sheet)
        {
            object[] objArray1;
            string   text1 = this.GetCell();

            if (text1 == string.Empty)
            {
                this.Expected("3d sheet cell reference.");
            }
            sheet = sheet + "!" + text1;
            if (this.GetNextOnDemand(':'))
            {
                string text2 = this.GetCell();
                if (RefFormulaToken.IsCell(text2))
                {
                    objArray1 = new object[] { sheet + ":" + text2, this.worksheet.Parent };
                    this.AddToken(FormulaTokenCode.Area3d2, objArray1);
                }
                else
                {
                    this.Expected("3d area reference.");
                }
            }
            else
            {
                objArray1 = new object[] { sheet, this.worksheet.Parent };
                this.AddToken(FormulaTokenCode.Ref3d2, objArray1);
            }
        }
Esempio n. 3
0
 private bool IsCell(string cellValue)
 {
     if (this.buffer.Peek() != RefFormulaToken.AbsoluteCellMark)
     {
         return(RefFormulaToken.IsCell(cellValue));
     }
     return(true);
 }
Esempio n. 4
0
        private string GetCell()
        {
            string text1 = string.Empty;

            if (this.GetNextOnDemand(RefFormulaToken.AbsoluteCellMark))
            {
                text1 = RefFormulaToken.AbsoluteCellMark + this.buffer.GetNextString(false);
            }
            else
            {
                text1 = this.buffer.GetNextString(false);
            }
            if (this.GetNextOnDemand(RefFormulaToken.AbsoluteCellMark, false))
            {
                text1 = text1 + RefFormulaToken.AbsoluteCellMark + this.buffer.GetNextString(false);
            }
            if (!RefFormulaToken.IsCell(text1))
            {
                this.Expected("Cell.");
            }
            return(text1);
        }