rowrecord.cs
来自「Excel的操作,其中可以读取及写入Excel 文件」· CS 代码 · 共 95 行
CS
95 行
using System;
using Microsoft.Fawvw.Components.NExcel.Biff;
namespace Microsoft.Fawvw.Components.NExcel.Read.Biff
{
/// <summary> A row record</summary>
public class RowRecord:RecordData
{
/// <summary> Interrogates whether this row is of default height
///
/// </summary>
/// <returns> TRUE if this is set to the default height, FALSE otherwise
/// </returns>
virtual internal bool isDefaultHeight()
{
return rowHeight == defaultHeightIndicator;
}
/// <summary> Gets the row number
///
/// </summary>
/// <returns> the number of this row
/// </returns>
virtual public int RowNumber
{
get
{
return rowNumber;
}
}
/// <summary> Gets the height of the row
///
/// </summary>
/// <returns> the row height
/// </returns>
virtual public int RowHeight
{
get
{
return rowHeight;
}
}
/// <summary> Queries whether the row is collapsed
///
/// </summary>
/// <returns> the collapsed indicator
/// </returns>
virtual public bool isCollapsed()
{
return collapsed;
}
/// <summary> Queries whether the row has been set to zero height
///
/// </summary>
/// <returns> the zero height indicator
/// </returns>
virtual public bool isZeroHeight()
{
return zeroHeight;
}
/// <summary> The number of this row</summary>
private int rowNumber;
/// <summary> The height of this row</summary>
private int rowHeight;
/// <summary> Flag to indicate whether this row is collapsed or not</summary>
private bool collapsed;
/// <summary> Indicates whether this row has zero height (ie. whether it is hidden)</summary>
private bool zeroHeight;
/// <summary> Indicates that the row is default height</summary>
private const int defaultHeightIndicator = 0xff;
/// <summary> Constructs this object from the raw data
///
/// </summary>
/// <param name="t">the raw data
/// </param>
internal RowRecord(Record t):base(t)
{
sbyte[] data = getRecord().Data;
rowNumber = IntegerHelper.getInt(data[0], data[1]);
rowHeight = IntegerHelper.getInt(data[6], data[7]);
sbyte opts = data[12];
collapsed = (opts & 0x20) != 0;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?