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

📄 mulblankcell.cs

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

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

namespace Microsoft.Fawvw.Components.NExcel.Read.Biff
{
	
	/// <summary> A blank cell value, initialized indirectly from a multiple biff record
	/// rather than directly from the binary data
	/// </summary>
	class MulBlankCell : Cell
	{
		/// <summary> Accessor for the row
		/// 
		/// </summary>
		/// <returns> the zero based row
		/// </returns>
		virtual public int Row
		{
			get
			{
				return row;
			}
			
		}
		/// <summary> Accessor for the column
		/// 
		/// </summary>
		/// <returns> the zero based column
		/// </returns>
		virtual public int Column
		{
			get
			{
				return column;
			}
			
		}
		/// <summary> Accessor for the contents as a string
		/// 
		/// </summary>
		/// <returns> the value as a string
		/// </returns>
		virtual public string Contents
		{
			get
			{
				return "";
			}
			
		}

		/// <summary>
		/// Returns the value.
		/// </summary>
		virtual public object Value
		{
			get
			{
				return "";
			}
		}

		/// <summary> Accessor for the cell type
		/// 
		/// </summary>
		/// <returns> the cell type
		/// </returns>
		virtual public CellType Type
		{
			get
			{
				return CellType.EMPTY;
			}
			
		}
		/// <summary> Gets the cell format for this cell
		/// 
		/// </summary>
		/// <returns>  the cell format for these cells
		/// </returns>
		virtual public Microsoft.Fawvw.Components.NExcel.Format.CellFormat CellFormat
		{
			get
			{
				if (!initialized)
				{
					cellFormat = formattingRecords.getXFRecord(xfIndex);
					initialized = true;
				}
				
				return cellFormat;
			}
			
		}
		/// <summary> Determines whether or not this cell has been hidden
		/// 
		/// </summary>
		/// <returns> TRUE if this cell has been hidden, FALSE otherwise
		/// </returns>
		virtual public bool Hidden
		{
			get
			{
				ColumnInfoRecord cir = sheet.getColumnInfo(column);
				
				if (cir != null && cir.Width == 0)
				{
					return true;
				}
				
				RowRecord rr = sheet.getRowInfo(row);
				
				if (rr != null && (rr.RowHeight == 0 || rr.isCollapsed()))
				{
					return true;
				}
				
				return false;
			}
			
		}
		/// <summary> The row containing this blank</summary>
		private int row;
		/// <summary> The column containing this blank</summary>
		private int column;
		/// <summary> The raw cell format</summary>
		private Microsoft.Fawvw.Components.NExcel.Format.CellFormat cellFormat;
		
		/// <summary> The index to the XF Record</summary>
		private int xfIndex;
		
		/// <summary> A handle to the formatting records</summary>
		private FormattingRecords formattingRecords;
		
		/// <summary> A flag to indicate whether this object's formatting things have
		/// been initialized
		/// </summary>
		private bool initialized;
		
		/// <summary> A handle to the sheet</summary>
		private SheetImpl sheet;
		
		/// <summary> Constructs this cell
		/// 
		/// </summary>
		/// <param name="r">the zero based row
		/// </param>
		/// <param name="c">the zero base column
		/// </param>
		/// <param name="xfi">the xf index
		/// </param>
		/// <param name="fr">the formatting records
		/// </param>
		/// <param name="si">the sheet
		/// </param>
		public MulBlankCell(int r, int c, int xfi, FormattingRecords fr, SheetImpl si)
		{
			row = r;
			column = c;
			xfIndex = xfi;
			formattingRecords = fr;
			sheet = si;
			initialized = false;
		}
	}
}

⌨️ 快捷键说明

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