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
Methods
Read(byte[])
public static NoxWorkbookData Read(byte[] data)
Parameters
databyte[]
Returns
Read(Stream)
Reads .xlsx (values, formulas, styles, column widths, row heights, hidden state, merges, frozen panes).
public static NoxWorkbookData Read(Stream stream)
Parameters
streamStream
Returns
ToBytes(NoxSheetData)
public static byte[] ToBytes(NoxSheetData sheet)
Parameters
sheetNoxSheetData
Returns
- byte[]
ToBytes(NoxWorkbookData)
public static byte[] ToBytes(NoxWorkbookData book)
Parameters
bookNoxWorkbookData
Returns
- byte[]
Write(NoxSheetData, Stream)
public static void Write(NoxSheetData sheet, Stream output)
Parameters
sheetNoxSheetDataoutputStream
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
bookNoxWorkbookDataoutputStream