Table of Contents

Class NoxExcel

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

Excel (.xlsx) to and from grid data. Reads and writes without external libraries.

var book = NoxExcel.Read(file.OpenReadStream());   // → to the web grid as JSON
var bytes = NoxExcel.ToBytes(book);                 // web grid data → .xlsx
public static class NoxExcel
Inheritance
NoxExcel
Inherited Members

Fields

ContentType

The MIME type for .xlsx.

public const string ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

Field Value

string

Methods

Read(byte[])

public static NoxWorkbookData Read(byte[] data)

Parameters

data byte[]

Returns

NoxWorkbookData

Read(Stream)

Reads .xlsx (values, formulas, styles, column widths, row heights, hidden state, merges, frozen panes).

public static NoxWorkbookData Read(Stream stream)

Parameters

stream Stream

Returns

NoxWorkbookData

ToBytes(NoxSheetData)

public static byte[] ToBytes(NoxSheetData sheet)

Parameters

sheet NoxSheetData

Returns

byte[]

ToBytes(NoxWorkbookData)

public static byte[] ToBytes(NoxWorkbookData book)

Parameters

book NoxWorkbookData

Returns

byte[]

Write(NoxSheetData, Stream)

public static void Write(NoxSheetData sheet, Stream output)

Parameters

sheet NoxSheetData
output Stream

Write(NoxWorkbookData, Stream)

Writes .xlsx. Formulas are evaluated and stored with their results; Excel recalculates them on open.

public static void Write(NoxWorkbookData book, Stream output)

Parameters

book NoxWorkbookData
output Stream