⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memfunc.cs

📁 Excel的操作,其中可以读取及写入Excel 文件
💻 CS
字号:
using System;
using System.Collections;

using Microsoft.Fawvw.Components.NExcel.ExcelCommon;
using Microsoft.Fawvw.Components.NExcel.Biff;

namespace Microsoft.Fawvw.Components.NExcel.Biff.Formula
{
	/// <summary> Indicates that the function doesn't evaluate to a constant reference</summary>
	
	class MemFunc:Operand, ParsedThing
	{
		/// <summary> Gets the token representation of this item in RPN.  The Attribute
		/// token is a special case, which overrides anything useful we could do
		/// in the base class
		/// 
		/// </summary>
		/// <returns> the bytes applicable to this formula
		/// </returns>
		override internal sbyte[] Bytes
		{
			get
			{
				return null;
			}
			
		}
		/// <summary> Gets the precedence for this operator.  Operator precedents run from 
		/// 1 to 5, one being the highest, 5 being the lowest
		/// 
		/// </summary>
		/// <returns> the operator precedence
		/// </returns>
		virtual internal int Precedence
		{
			get
			{
				return 5;
			}
			
		}
		/// <summary> Accessor for the .Length
		/// 
		/// </summary>
		/// <returns> the .Length of the subexpression
		/// </returns>
		virtual public int Length
		{
			get
			{
				return length;
			}
			
		}
		virtual public ParseItem[] SubExpression
		{
			set
			{
				subExpression = value;
			}
			
		}
		/// <summary> The number of bytes in the subexpression</summary>
		private int length;
		
		/// <summary> The sub expression</summary>
		private ParseItem[] subExpression;
		
		/// <summary> Constructor</summary>
		public MemFunc()
		{
		}
		
		/// <summary> Reads the ptg data from the array starting at the specified position
		/// 
		/// </summary>
		/// <param name="data">the RPN array
		/// </param>
		/// <param name="pos">the current position in the array, excluding the ptg identifier
		/// </param>
		/// <returns> the number of bytes read
		/// </returns>
		public virtual int read(sbyte[] data, int pos)
		{
			length = IntegerHelper.getInt(data[pos], data[pos + 1]);
			return 2;
		}
		
		/// <summary> Gets the operands for this operator from the stack</summary>
		public virtual void  getOperands(Stack s)
		{
		}
		
		public override void  getString(System.Text.StringBuilder buf)
		{
			if (subExpression.Length == 1)
			{
				subExpression[0].getString(buf);
			}
			else if (subExpression.Length == 2)
			{
				subExpression[1].getString(buf);
				buf.Append(':');
				subExpression[0].getString(buf);
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -