labelsstrecord.cs

来自「Excel的操作,其中可以读取及写入Excel 文件」· CS 代码 · 共 87 行

CS
87
字号
using System;

using Microsoft.Fawvw.Components.NExcel.Biff;

namespace Microsoft.Fawvw.Components.NExcel.Read.Biff
{
	
	/// <summary> A label which is stored in the shared string table</summary>
	class LabelSSTRecord:CellValue, LabelCell
	{
		/// <summary> Gets the label
		/// 
		/// </summary>
		/// <returns> the label
		/// </returns>
		virtual public string StringValue
		{
			get
			{
				return _Value;
			}
			
		}

		/// <summary>
		/// Returns the string value.
		/// </summary>
		override public object Value
		{
			get
			{
				return this._Value;
			}
		}

		/// <summary> Gets this cell's contents as a string
		/// 
		/// </summary>
		/// <returns> the label
		/// </returns>
		virtual public string Contents
		{
			get
			{
				return _Value;
			}
			
		}
		/// <summary> Returns the cell type
		/// 
		/// </summary>
		/// <returns> the cell type
		/// </returns>
		virtual public CellType Type
		{
			get
			{
				return CellType.LABEL;
			}
			
		}
		/// <summary> The index into the shared string table</summary>
		private int index;
		/// <summary> The label</summary>
		private string _Value;
		
		/// <summary> Constructor.  Retrieves the index from the raw data and looks it up
		/// in the shared string table
		/// 
		/// </summary>
		/// <param name="stringTable">the shared string table
		/// </param>
		/// <param name="t">the raw data
		/// </param>
		/// <param name="fr">the formatting records
		/// </param>
		/// <param name="si">the sheet
		/// </param>
		public LabelSSTRecord(Record t, SSTRecord stringTable, FormattingRecords fr, SheetImpl si):base(t, fr, si)
		{
			sbyte[] data = getRecord().Data;
			index = IntegerHelper.getInt(data[6], data[7], data[8], data[9]);
			_Value = stringTable.getString(index);
		}
	}
}

⌨️ 快捷键说明

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