Table of Contents

Class NoxSheetData

Namespace
Nox.Grid.Server
Assembly
Nox.Grid.Server.dll

A sheet. Only cells with content are stored (zero-based rows and columns).

public sealed class NoxSheetData
Inheritance
NoxSheetData
Inherited Members

Properties

AutoFilter

AutoFilter buttons on the first row.

public bool AutoFilter { get; set; }

Property Value

bool

AutoFilterRange

Auto filter range such as "A2:H61" (multi-row headers, footer row). Empty: from A1 to the last cell.

public string AutoFilterRange { get; set; }

Property Value

string

Cells

public List<NoxCellData> Cells { get; set; }

Property Value

List<NoxCellData>

ColumnCount

The number of columns.

public int ColumnCount { get; set; }

Property Value

int

Columns

Column info (width, hidden, format, header). Missing columns use defaults.

public List<NoxColumnData> Columns { get; set; }

Property Value

List<NoxColumnData>

FrozenColumns

public int FrozenColumns { get; set; }

Property Value

int

FrozenRows

public int FrozenRows { get; set; }

Property Value

int

Merges

public List<NoxMergeData> Merges { get; set; }

Property Value

List<NoxMergeData>

Name

public string Name { get; set; }

Property Value

string

RowCount

The number of rows (shown even if there are no cells).

public int RowCount { get; set; }

Property Value

int

Rows

Row info (height, hidden). Missing rows use defaults.

public List<NoxRowData> Rows { get; set; }

Property Value

List<NoxRowData>

Methods

Cell(int, int)

Finds a cell (null if not found).

public NoxCellData Cell(int row, int col)

Parameters

row int
col int

Returns

NoxCellData

FromObjects<T>(IEnumerable<T>, string, IDictionary<string, string>)

Creates a sheet from a list of objects. The first row is the header (property names or headers); each following row holds one object.

public static NoxSheetData FromObjects<T>(IEnumerable<T> items, string name = "Sheet1", IDictionary<string, string> headers = null)

Parameters

items IEnumerable<T>
name string
headers IDictionary<string, string>

Returns

NoxSheetData

Type Parameters

T

GetValue(int, int)

Gets a cell value (null if none).

public object GetValue(int row, int col)

Parameters

row int
col int

Returns

object

SetFormula(int, int, string)

Sets a formula ("=SUM(A1:A3)"). Throws NoxFormulaException on a syntax error.

public NoxCellData SetFormula(int row, int col, string formula)

Parameters

row int
col int
formula string

Returns

NoxCellData

SetValue(int, int, object)

Sets a cell value (string, number, bool, DateTime, null). Creates the cell if needed.

public NoxCellData SetValue(int row, int col, object value)

Parameters

row int
col int
value object

Returns

NoxCellData