ExcelWorkbook.LoadFromCsv(Stream, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings) Method

Loads a CSV stream into a worksheet.

Definition

Namespace: Winnovative.ExcelLib
Assembly: WnvXls_NetCore (in WnvXls_NetCore.dll) Version: 12.0.0
C#
public static ExcelWorkbook LoadFromCsv(
	Stream csvStream,
	Encoding textEncoding,
	string fieldsSeparator,
	int topRowIndex,
	int leftColumnIndex,
	ExcelWorkbookFormat workbookFormat,
	ExcelWorkbookDefaultSettings defaultSettings
)

Parameters

csvStream  Stream
The stream containing the CSV document.
textEncoding  Encoding
The encoding of the text inside CSV (e.g. windows-1252, utf-8, etc).
fieldsSeparator  String
The fields separator in CSV (usually ',')
topRowIndex  Int32
The one based index of the first row in worksheet where the import will start.
leftColumnIndex  Int32
The one based index of the first column in worksheet where the import will start.
workbookFormat  ExcelWorkbookFormat
The format of the created workbook ( Excel 97-2003 .xls or Excel 2007 .xlsx).
defaultSettings  ExcelWorkbookDefaultSettings
The default settings for the newly created workbook (like default font, row height or column width).

Return Value

ExcelWorkbook
The newly created workbook.

See Also