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

📄 errorrecord.cs

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

using Microsoft.Fawvw.Components.NExcel.Biff;

namespace Microsoft.Fawvw.Components.NExcel.Read.Biff
{
	
	/// <summary> A cell containing an error code.  This will usually be the result
	/// of some error during the calculation of a formula
	/// </summary>
	class ErrorRecord:CellValue, ErrorCell
	{
		/// <summary> Interface method which gets the error code for this cell.  If this cell
		/// does not represent an error, then it returns 0.  Always use the
		/// method isError() to  determine this prior to calling this method
		/// 
		/// </summary>
		/// <returns> the error code if this cell contains an error, 0 otherwise
		/// </returns>
		virtual public int ErrorCode
		{
			get
			{
				return errorCode;
			}
			
		}
		/// <summary> Returns the numerical value as a string
		/// 
		/// </summary>
		/// <returns> The numerical value of the formula as a string
		/// </returns>
		virtual public string Contents
		{
			get
			{
				return "ERROR " + errorCode;
			}
			
		}
		/// <summary> Returns the cell type
		/// 
		/// </summary>
		/// <returns> The cell type
		/// </returns>
		virtual public CellType Type
		{
			get
			{
				return CellType.ERROR;
			}
			
		}
		/// <summary> The error code if this cell evaluates to an error, otherwise zer0</summary>
		private int errorCode;
		
		/// <summary> Constructs this object
		/// 
		/// </summary>
		/// <param name="t">the raw data
		/// </param>
		/// <param name="fr">the formatting records
		/// </param>
		/// <param name="si">the sheet
		/// </param>
		public ErrorRecord(Record t, FormattingRecords fr, SheetImpl si):base(t, fr, si)
		{
			
			sbyte[] data = getRecord().Data;
			
			errorCode = data[6];
		}
	}
}

⌨️ 快捷键说明

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