Table of Contents

ExcelWorksheetDimensions Struct

Definition

Namespace
Bodu.Formats.Excel
Assembly
Bodu.Formats.Excel.Binary.dll
Package
Bodu.Formats.Excel.Binary 1.0.0
Source
ExcelWorksheetDimensions.cs

Describes the used range of a worksheet as declared by its DIMENSIONS record: the half-open span of rows and columns that bounds the sheet's populated cells.

public readonly struct ExcelWorksheetDimensions : IEquatable<ExcelWorksheetDimensions>
Implements
Inherited Members
Extension Methods

Remarks

The used range covers rows [FirstRowIndex, FirstRowIndex + RowCount) and columns [FirstColumnIndex, FirstColumnIndex + ColumnCount). Excel records the extent it has allocated, which may be larger than the region that actually holds values, so this range is an upper bound rather than a tight fit.

A worksheet with no DIMENSIONS record yields the default value, whose counts are zero.

Properties

ColumnCount

Gets the number of columns in the used range.

public int ColumnCount { get; }

Property Value

int

The count of columns spanned by the used range.

FirstColumnIndex

Gets the zero-based index of the first used column.

public int FirstColumnIndex { get; }

Property Value

int

The first column index of the used range.

FirstRowIndex

Gets the zero-based index of the first used row.

public int FirstRowIndex { get; }

Property Value

int

The first row index of the used range.

RowCount

Gets the number of rows in the used range.

public int RowCount { get; }

Property Value

int

The count of rows spanned by the used range.

Methods

Equals(ExcelWorksheetDimensions)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ExcelWorksheetDimensions other)

Parameters

other ExcelWorksheetDimensions

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(ExcelWorksheetDimensions, ExcelWorksheetDimensions)

public static bool operator ==(ExcelWorksheetDimensions left, ExcelWorksheetDimensions right)

Parameters

left ExcelWorksheetDimensions
right ExcelWorksheetDimensions

Returns

bool

operator !=(ExcelWorksheetDimensions, ExcelWorksheetDimensions)

public static bool operator !=(ExcelWorksheetDimensions left, ExcelWorksheetDimensions right)

Parameters

left ExcelWorksheetDimensions
right ExcelWorksheetDimensions

Returns

bool

Applies to

ProductVersions
.NET8, 10