Class NoxCsv
- Namespace
- Nox.Grid.Server
- Assembly
- Nox.Grid.Server.dll
CSV to and from grid data. Detects the text encoding (UTF-8, CP949) and delimiter (comma, tab, semicolon) automatically.
public static class NoxCsv
- Inheritance
-
NoxCsv
- Inherited Members
Fields
ContentType
The MIME type for CSV.
public const string ContentType = "text/csv"
Field Value
Methods
Read(byte[], char?, Encoding, string)
public static NoxSheetData Read(byte[] data, char? delimiter = null, Encoding encoding = null, string sheetName = "Sheet1")
Parameters
Returns
Read(Stream, char?, Encoding, string)
Reads CSV. If delimiter is null, it is detected. Numeric text becomes numbers (codes with leading zeros stay text).
public static NoxSheetData Read(Stream stream, char? delimiter = null, Encoding encoding = null, string sheetName = "Sheet1")
Parameters
Returns
ReadText(string, char?, string)
Reads CSV text.
public static NoxSheetData ReadText(string text, char? delimiter = null, string sheetName = "Sheet1")
Parameters
Returns
ToBytes(NoxSheetData, char)
CSV bytes (with a UTF-8 BOM so non-ASCII text is not garbled in Excel).
public static byte[] ToBytes(NoxSheetData sheet, char delimiter = ',')
Parameters
sheetNoxSheetDatadelimiterchar
Returns
- byte[]
Write(NoxSheetData, TextWriter, char)
Writes CSV (values are computed results; dates are yyyy-MM-dd[ HH:mm:ss]).
public static void Write(NoxSheetData sheet, TextWriter writer, char delimiter = ',')
Parameters
sheetNoxSheetDatawriterTextWriterdelimiterchar