Table of Contents

BiffFormulaRecord Struct

Definition

Namespace
Bodu.IO.Biff
Assembly
Bodu.IO.Biff.dll
Package
Bodu.IO.Biff 1.0.0
Source
BiffFormulaRecord.cs

Represents a decoded FORMULA record: the cell's position and format, the cached result of its last calculation, its option flags, and the parsed-expression tokens, which the codec exposes as raw bytes.

public readonly ref struct BiffFormulaRecord
Inherited Members

Remarks

The eight-byte result field holds a double unless its last two bytes are 0xFFFF, in which case its first byte selects the kind (CachedResultKind) and a string result is carried by the STRING record that immediately follows. The layout is identical in BIFF5 and BIFF8.

Properties

BooleanValue

Gets a value indicating whether the cached boolean result is true.

public bool BooleanValue { get; }

Property Value

bool

true when the value byte is non-zero.

CachedResultKind

Gets the kind of cached result the record carries.

public BiffCachedResultKind CachedResultKind { get; }

Property Value

BiffCachedResultKind

The result kind.

Column

Gets the zero-based column index.

public int Column { get; }

Property Value

int

The column index.

ErrorCode

Gets the cached error code.

public byte ErrorCode { get; }

Property Value

byte

The BIFF error code.

Flags

Gets the option flags (grbit): bit 0 always-calculate, bit 1 calculate-on-load, bit 3 shared formula.

public ushort Flags { get; }

Property Value

ushort

The raw flags, or zero when the record omits them.

NumberValue

Gets the cached numeric result.

public double NumberValue { get; }

Property Value

double

The number; meaningful only when CachedResultKind is Number.

RawValue

Gets the cached boolean or error byte.

public byte RawValue { get; }

Property Value

byte

The value byte; meaningful only when CachedResultKind is Boolean or Error.

Row

Gets the zero-based row index.

public int Row { get; }

Property Value

int

The row index.

Tokens

Gets the parsed-expression tokens (rgce) as raw bytes. The codec does not interpret them.

public ReadOnlySpan<byte> Tokens { get; }

Property Value

ReadOnlySpan<byte>

The token bytes, or an empty span when the record omits them.

XfIndex

Gets the extended-format index of the cell.

public ushort XfIndex { get; }

Property Value

ushort

The XF index.

Applies to

ProductVersions
.NET8, 10

See Also