BiffLimits Class
Definition
Defines the structural limits of the BIFF record format.
public static class BiffLimits
- Inheritance
-
BiffLimits
- Inherited Members
Remarks
The per-version maximum payload is enforced by BiffWriter and tolerated, not enforced, by BiffReader, which frames any length the 16-bit field can express. DefaultCodePage is
assumed for BIFF5 byte strings until a CODEPAGE record is read, and UnicodeCodePage is the
value a BIFF8 CODEPAGE record carries.
Fields
AbsoluteMaxPayloadLength
The largest payload the 16-bit length field can express, in bytes. A reader tolerates declared lengths up to this value; a writer enforces the per-version maximum.
public const int AbsoluteMaxPayloadLength = 65535
Field Value
Biff5MaxPayloadLength
The largest payload a BIFF5 record may declare, in bytes.
public const int Biff5MaxPayloadLength = 2080
Field Value
Biff8MaxPayloadLength
The largest payload a BIFF8 record may declare, in bytes.
public const int Biff8MaxPayloadLength = 8224
Field Value
DefaultCodePage
The default code page assumed for byte strings when no CODEPAGE record has been read (Windows-1252).
public const int DefaultCodePage = 1252
Field Value
RecordHeaderSize
The size, in bytes, of a record header: a 16-bit identifier followed by a 16-bit payload length.
public const int RecordHeaderSize = 4
Field Value
UnicodeCodePage
The code page value a BIFF8 CODEPAGE record carries to declare UTF-16LE text.
public const int UnicodeCodePage = 1200
Field Value
Methods
GetMaxPayloadLength(BiffVersion)
Gets the largest payload a record may declare under the specified version, in bytes.
public static int GetMaxPayloadLength(BiffVersion version)
Parameters
versionBiffVersionThe BIFF version.
Returns
- int
Biff5MaxPayloadLength for Biff5, Biff8MaxPayloadLength for Biff8, and AbsoluteMaxPayloadLength when the version is unknown.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |